Last active
August 29, 2015 14:05
-
-
Save ToQoz/393ae89009dc5827dfbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { | |
FS = "\n"; | |
"whoami" | getline user | |
} | |
{ | |
if (system("test -d \"" $1 "/.git\"") != 0) { | |
next | |
} | |
skip = 1 | |
# Give rev `HEAD` explicitly to prevent reading from stdin | |
# https://github.com/git/git/blob/ad524f834a9acaaaceeb846d00ea609f79333a3d/builtin/shortlog.c#L274 | |
while ("git -C " $1 " --no-pager shortlog -nes HEAD" | getline cinfo) { | |
if (tolower(cinfo) ~ user) { | |
skip = 0 | |
break | |
} | |
} | |
} | |
!skip { | |
print $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment