From: Junio C Hamano Date: Tue, 21 Feb 2006 03:26:21 +0000 (-0800) Subject: Fix fmt-merge-msg counting. X-Git-Tag: v1.3.0-rc1~179 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d37a1ed7f2993a3cb8da0dd0fbcf993ba6579c82;p=git.git Fix fmt-merge-msg counting. Signed-off-by: Junio C Hamano --- diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl index c34ddc5d..3de67d77 100755 --- a/git-fmt-merge-msg.perl +++ b/git-fmt-merge-msg.perl @@ -55,9 +55,9 @@ sub current_branch { } sub shortlog { - my ($tip, $limit) = @_; + my ($tip) = @_; my ($fh, @result); - open $fh, '-|', ('git-log', "--max-count=$limit", '--topo-order', + open $fh, '-|', ('git-log', '--topo-order', '--pretty=oneline', $tip, '^HEAD') or die "$!"; while (<$fh>) { @@ -160,7 +160,7 @@ my $limit = 20; for (@origin) { my ($sha1, $name) = @$_; - my @log = shortlog($sha1, $limit + 1); + my @log = shortlog($sha1); if ($limit + 1 <= @log) { print "\n* $name: (" . scalar(@log) . " commits)\n"; }