Fix fmt-merge-msg counting.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
@ -55,9 +55,9 @@ sub current_branch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub shortlog {
|
sub shortlog {
|
||||||
my ($tip, $limit) = @_;
|
my ($tip) = @_;
|
||||||
my ($fh, @result);
|
my ($fh, @result);
|
||||||
open $fh, '-|', ('git-log', "--max-count=$limit", '--topo-order',
|
open $fh, '-|', ('git-log', '--topo-order',
|
||||||
'--pretty=oneline', $tip, '^HEAD')
|
'--pretty=oneline', $tip, '^HEAD')
|
||||||
or die "$!";
|
or die "$!";
|
||||||
while (<$fh>) {
|
while (<$fh>) {
|
||||||
@ -160,7 +160,7 @@ my $limit = 20;
|
|||||||
|
|
||||||
for (@origin) {
|
for (@origin) {
|
||||||
my ($sha1, $name) = @$_;
|
my ($sha1, $name) = @$_;
|
||||||
my @log = shortlog($sha1, $limit + 1);
|
my @log = shortlog($sha1);
|
||||||
if ($limit + 1 <= @log) {
|
if ($limit + 1 <= @log) {
|
||||||
print "\n* $name: (" . scalar(@log) . " commits)\n";
|
print "\n* $name: (" . scalar(@log) . " commits)\n";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user