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

[PATCH v3 3/3] git-p4: Change p4 command invocation

From
Vitor Antunes <vitor.hda@gmail.com>
Date
Jan 25, 2012, 23:48 UTC
Message-ID
<1327535304-11332-4-git-send-email-vitor.hda@gmail.com>
In-Reply-To
<1327535304-11332-1-git-send-email-vitor.hda@gmail.com>
From: Pete Wyckoff <pw@padd.com>

Change p4 command invocation to avoid going through the shell. This allows names with spaces and wildcards to work.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
---
 contrib/fast-import/git-p4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 584cc41..74d3613 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1975,7 +1975,7 @@ class P4Sync(Command, P4UserMap):
     def importChanges(self, changes):
         cnt = 1
         for change in changes:
-            description = p4Cmd("describe %s" % change)
+            description = p4Cmd(["describe", str(change)])
             self.updateOptionDict(description)
 
             if not self.silent:
-- 
1.7.8.3
Previous: Vitor AntunesNext: Pete Wyckoff
Message 4 of 5 in “git-p4: Search for parent commit on branch creation”
  1. 0/3 git-p4: Search for parent commit on branch creationVitor Antunes, Jan 25, 2012
  2. 1/3 git-p4: Search for parent commit on branch creationVitor Antunes, Jan 25, 2012
  3. 2/3 git-p4: Add test case for complex branch importVitor Antunes, Jan 25, 2012
  4. 3/3 git-p4: Change p4 command invocationVitor Antunes, Jan 25, 2012
  5. Pete WyckoffJan 26, 2012

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.