git p4: avoid shell when invoking git config --get-all
Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pete Wyckoff committed
Jan 26, 2013 at 22:11 UTC
2abba3014e54920762eb81236e394af7b152f74c
1 file changed
+2
-1
git-p4.py
+2
-1
@@ -571,7 +571,8 @@ def gitConfig(key, args = None): # set args to "--bool", for instance
571
572
def gitConfigList(key):
573
if not _gitConfig.has_key(key):
574
- _gitConfig[key] = read_pipe("git config --get-all %s" % key, ignore_error=True).strip().split(os.linesep)
574
+ s = read_pipe(["git", "config", "--get-all", key], ignore_error=True)
575
+ _gitConfig[key] = s.strip().split(os.linesep)
576
return _gitConfig[key]
577
578
def p4BranchesInGit(branchesAreInRemotes=True):