From: Junio C Hamano Date: Wed, 22 Feb 2006 06:51:21 +0000 (-0800) Subject: Merge branch 'jc/perl' X-Git-Tag: v1.3.0-rc1~163 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6b98579babe767b343bf6e1448b52befd5fc0a2e;p=git.git Merge branch 'jc/perl' * jc/perl: cvsimport: avoid open "-|" list form for Perl 5.6 svnimport: avoid open "-|" list form for Perl 5.6 send-email: avoid open "-|" list form for Perl 5.6 rerere: avoid open "-|" list form for Perl 5.6 fmt-merge-msg: avoid open "-|" list form for Perl 5.6 --- 6b98579babe767b343bf6e1448b52befd5fc0a2e diff --cc git-fmt-merge-msg.perl index 3de67d779,a77e94eb5..c13af4884 --- a/git-fmt-merge-msg.perl +++ b/git-fmt-merge-msg.perl @@@ -55,11 -60,14 +60,14 @@@ sub current_branch } sub shortlog { - my ($tip, $limit) = @_; + my ($tip) = @_; my ($fh, @result); - open $fh, '-|', ('git-log', '--topo-order', - '--pretty=oneline', $tip, '^HEAD') - or die "$!"; + my $pid = open($fh, '-|'); + die "$!" unless defined $pid; + if (!$pid) { - exec('git-log', "--max-count=$limit", '--topo-order', ++ exec('git-log', '--topo-order', + '--pretty=oneline', $tip, '^HEAD') or die "$!"; + } while (<$fh>) { s/^[0-9a-f]{40}\s+//; push @result, $_;