Skip to content

Commit

Permalink
Fix fmt-merge-msg counting.
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Feb 21, 2006
1 parent 551ce28 commit d37a1ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git-fmt-merge-msg.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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>) {
Expand Down Expand Up @@ -160,7 +160,7 @@ sub shortlog {

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";
}
Expand Down

0 comments on commit d37a1ed

Please sign in to comment.