Skip to content

Commit

Permalink
git-p4: return an empty list if a list config has no values
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Lars Schneider authored and Junio C Hamano committed Oct 3, 2015
1 parent cb1dafd commit 7960e70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ def gitConfigList(key):
if not _gitConfig.has_key(key):
s = read_pipe(["git", "config", "--get-all", key], ignore_error=True)
_gitConfig[key] = s.strip().split(os.linesep)
if _gitConfig[key] == ['']:
_gitConfig[key] = []
return _gitConfig[key]

def p4BranchesInGit(branchesAreInRemotes=True):
Expand Down

0 comments on commit 7960e70

Please sign in to comment.