author | Junio C Hamano <junkio@cox.net> | |
Wed, 22 Feb 2006 06:51:21 +0000 (22:51 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 22 Feb 2006 06:51:21 +0000 (22:51 -0800) |
* 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
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
1 | 2 | |||
---|---|---|---|---|
git-fmt-merge-msg.perl | patch | | diff1 | | diff2 | | blob | history |
diff --cc git-fmt-merge-msg.perl
index 3de67d779044ca0a9a511eded6929b3c33ddcd1f,a77e94eb5a8933cb43c8aa0707a7a345f14e97f5..c13af4884abc9371250687cb2ab25b66a91acc48
+++ b/git-fmt-merge-msg.perl
}
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, $_;