From: Junio C Hamano Date: Mon, 20 Feb 2006 22:17:28 +0000 (-0800) Subject: cvsimport: avoid open "-|" list form for Perl 5.6 X-Git-Tag: v1.3.0-rc1~163^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dd27478f092295069b148a4cfcf92fea9a4aab03;p=git.git cvsimport: avoid open "-|" list form for Perl 5.6 Signed-off-by: Junio C Hamano --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 24f98343..b46469ab 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -846,8 +846,12 @@ while() { print "Drop $fn\n" if $opt_v; } else { print "".($init ? "New" : "Update")." $fn: $size bytes\n" if $opt_v; - open my $F, '-|', "git-hash-object -w $tmpname" + my $pid = open(my $F, '-|'); + die $! unless defined $pid; + if (!$pid) { + exec("git-hash-object", "-w", $tmpname) or die "Cannot create object: $!\n"; + } my $sha = <$F>; chomp $sha; close $F;