cvsimport: always pass user data to "system" as a list
authorJeff King <peff@peff.net>
Wed, 30 Apr 2008 04:36:14 +0000 (00:36 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Apr 2008 05:45:27 +0000 (22:45 -0700)
This avoids invoking the shell. Not only is it faster, but
it prevents the possibility of interpreting our arguments in
the shell.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-cvsimport.perl
index 8093996e257e510da9060a3d00661170c59437b6..33777e278585268c767ebcab6fbf65352a5459f0 100755 (executable)
@@ -767,7 +767,7 @@ sub commit {
        waitpid($pid,0);
        die "Error running git-commit-tree: $?\n" if $?;
 
-       system("git-update-ref $remote/$branch $cid") == 0
+       system('git-update-ref', "$remote/$branch", $cid) == 0
                or die "Cannot write branch $branch for update: $!\n";
 
        if ($tag) {