rev-list.c: fix non-grammatical comments.
[gitweb.git] / git-cvsimport.perl
index 24f983434249e0c37b7f2229e73c70b374403dc4..b46469ab32fa5707c8056c5a32db61d7c268e50b 100755 (executable)
@@ -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;