Skip to content

Commit

Permalink
cvsimport: avoid open "-|" list form for Perl 5.6
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 20, 2006
1 parent 7ae0dc0 commit dd27478
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,12 @@ ($$)
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;
Expand Down

0 comments on commit dd27478

Please sign in to comment.