Browse Source

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

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 19 years ago
parent
commit
dd27478f09
  1. 6
      git-cvsimport.perl

6
git-cvsimport.perl

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

Loading…
Cancel
Save