git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cvsimport: always pass user data to "system" as a list
@ 2008-04-30  4:36 Jeff King
  2008-04-30  7:30 ` Nigel Magnay
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff King @ 2008-04-30  4:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Nigel Magnay, git

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>
---
Nigel reported a problem with a CVS branch that had '(' in the name. No
report yet on whether this fixes it, but it should be done regardless.

I checked over git-cvsimport.perl, and this was the only instance I
found.

 git-cvsimport.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 95c5eec..bdac5d5 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -772,7 +772,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) {
-- 
1.5.5.1.178.gc1eb9.dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cvsimport: always pass user data to "system" as a list
  2008-04-30  4:36 [PATCH] cvsimport: always pass user data to "system" as a list Jeff King
@ 2008-04-30  7:30 ` Nigel Magnay
  0 siblings, 0 replies; 2+ messages in thread
From: Nigel Magnay @ 2008-04-30  7:30 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, git

This fixed my import problem - thanks for the swift identification (my
perl isn't so hot so it scared me :) )

On Wed, Apr 30, 2008 at 5:36 AM, Jeff King <peff@peff.net> wrote:
> 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>
>  ---
>  Nigel reported a problem with a CVS branch that had '(' in the name. No
>  report yet on whether this fixes it, but it should be done regardless.
>
>  I checked over git-cvsimport.perl, and this was the only instance I
>  found.
>
>   git-cvsimport.perl |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
>  diff --git a/git-cvsimport.perl b/git-cvsimport.perl
>  index 95c5eec..bdac5d5 100755
>  --- a/git-cvsimport.perl
>  +++ b/git-cvsimport.perl
>  @@ -772,7 +772,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) {
>  --
>  1.5.5.1.178.gc1eb9.dirty
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-30  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30  4:36 [PATCH] cvsimport: always pass user data to "system" as a list Jeff King
2008-04-30  7:30 ` Nigel Magnay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).