cvsimport: avoid open "-|" list form for Perl 5.6

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-02-20 14:17:28 -08:00
parent 7ae0dc015d
commit dd27478f09

View File

@ -846,8 +846,12 @@ while(<CVS>) {
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;