for-each-ref: fix off by one read.
[gitweb.git] / git-svnimport.perl
index d3ad5b904f3d025aaf89aa5a7ef2e6464fd9b5b8..aa5b3b2c9700d9a3cfe79011499405b67da6b33e 100755 (executable)
@@ -633,7 +633,7 @@ sub commit {
 
        my $rev;
        if($revision > $opt_s and defined $parent) {
-               open(H,"git-rev-parse --verify $parent |");
+               open(H,'-|',"git-rev-parse","--verify",$parent);
                $rev = <H>;
                close(H) or do {
                        print STDERR "$revision: cannot find commit '$parent'!\n";