Skip to content

Commit

Permalink
git p4: avoid shell when invoking git config --get-all
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Jan 27, 2013
1 parent c7d3488 commit 2abba30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2abba30

Please sign in to comment.