tweak authors.pl convenience
This commit is contained in:
parent
f4fd207fdc
commit
57d88594b6
1 changed files with 9 additions and 2 deletions
|
|
@ -15,9 +15,16 @@ our $insertions;
|
|||
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: (.*) </;
|
||||
my ($insert, $delete) = /files changed, (\d+) insert.*(\d+) delet/;
|
||||
my ($insert, $delete) = /files changed, (\d+) insert.* (\d+) delet/;
|
||||
next unless defined $insert;
|
||||
$auth{$author} = [0, 0, 0] unless defined($auth{$author});
|
||||
my @l = @{$auth{$author}};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue