git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cvsimport: always pass user data to "system" as a list

From
Jeff King <peff@peff.net>
Date
Apr 30, 2008, 04:36 UTC
Message-ID
<20080430043614.GA31019@sigill.intra.peff.net>

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
Next: Nigel Magnay
Message 1 of 2 in “cvsimport: always pass user data to "system" as a list”
  1. cvsimport: always pass user data to "system" as a listJeff King, Apr 30, 2008
  2. Nigel MagnayApr 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.