summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-20 22:17:28 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-20 22:24:06 (GMT)
commitdd27478f092295069b148a4cfcf92fea9a4aab03 (patch)
tree4ef997728b7bbad6f4e886453a471eaa723b5fd6 /git-cvsimport.perl
parent7ae0dc015dc38ce937bb2c044ff8b4875678e8af (diff)
downloadgit-dd27478f092295069b148a4cfcf92fea9a4aab03.zip
git-dd27478f092295069b148a4cfcf92fea9a4aab03.tar.gz
git-dd27478f092295069b148a4cfcf92fea9a4aab03.tar.bz2
cvsimport: avoid open "-|" list form for Perl 5.6
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 24f9834..b46469a 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -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;