Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 2abba30

Browse files
Pete Wyckoffgitster
authored andcommitted
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>
1 parent c7d3488 commit 2abba30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-p4.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,8 @@ def gitConfig(key, args = None): # set args to "--bool", for instance
571571

572572
def gitConfigList(key):
573573
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)
575576
return _gitConfig[key]
576577

577578
def p4BranchesInGit(branchesAreInRemotes=True):

0 commit comments

Comments
 (0)