Code

git-svnimport: Use separate arguments in the pipe for git-rev-parse
authorMatthias Urlichs <smurf@smurf.noris.de>
Tue, 18 Sep 2007 09:29:09 +0000 (11:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Sep 2007 21:00:20 +0000 (14:00 -0700)
Some people seem to create SVN branch names with spaces
or other shell metacharacters.

Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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";