diff --git a/scripts/authors.pl b/scripts/authors.pl index d1f98ecaad3..89502c6985c 100755 --- a/scripts/authors.pl +++ b/scripts/authors.pl @@ -15,9 +15,16 @@ our $deletions; our $author; -while (<>) { +my $input; +if (@ARGV > 0) { + open $input, "git log --shortstat -z --minimal -w -C $ARGV[0]|" or die "cannot open pipe for $ARGV[0]: $!\n"; +} else { + $input = \*STDIN; +} + +while (<$input>) { ($author) = /Author: (.*)