git p4: avoid shell when invoking git config --get-all
authorPete Wyckoff <pw@padd.com>
Sun, 27 Jan 2013 03:11:22 +0000 (22:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Jan 2013 06:00:40 +0000 (22:00 -0800)
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py

index c8ae83d502ed58d42bc33c500366b855e360285f..7efa9a862e82e1cd95eb4122a7ebb4d075051678 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -571,7 +571,8 @@ def gitConfig(key, args = None): # set args to "--bool", for instance
 
 def gitConfigList(key):
     if not _gitConfig.has_key(key):
-        _gitConfig[key] = read_pipe("git config --get-all %s" % key, ignore_error=True).strip().split(os.linesep)
+        s = read_pipe(["git", "config", "--get-all", key], ignore_error=True)
+        _gitConfig[key] = s.strip().split(os.linesep)
     return _gitConfig[key]
 
 def p4BranchesInGit(branchesAreInRemotes=True):