Include a calculation and printing of total Lines
This commit is contained in:
parent
c555532725
commit
65cab7dfc0
1 changed files with 2 additions and 1 deletions
|
@ -55,10 +55,11 @@ for my $file (<*.diffstat>) {
|
||||||
unless defined $commit{files} and defined $commit{insertions}
|
unless defined $commit{files} and defined $commit{insertions}
|
||||||
and defined $commit{deletions};
|
and defined $commit{deletions};
|
||||||
close DIFFSTAT; die "error reading $file: $!" unless ($? == 0);
|
close DIFFSTAT; die "error reading $file: $!" unless ($? == 0);
|
||||||
|
$commit{totalLines} = $commit{insertions} + $commit{deletions};
|
||||||
$commitTotals{$commitID} = \%commit;
|
$commitTotals{$commitID} = \%commit;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $type (qw/files insertions deletions/) {
|
foreach my $type (qw/files insertions deletions totalLines/) {
|
||||||
print "Sorted by $type:\n";
|
print "Sorted by $type:\n";
|
||||||
foreach my $commitID (
|
foreach my $commitID (
|
||||||
sort { $commitTotals{$a}{$type} <=> $commitTotals{$b}{$type} }
|
sort { $commitTotals{$a}{$type} <=> $commitTotals{$b}{$type} }
|
||||||
|
|
Loading…
Reference in a new issue