mirror of
https://github.com/git/git.git
synced 2024-11-20 16:34:04 +01:00
git-p4: Cache git config for performance
This makes git-p4 noticibly faster on Windows. Signed-off-by: John Chapman <thestar@fussycoder.id.au> Acked-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
7f96e2e25a
commit
36bd844658
@ -316,8 +316,11 @@ def gitBranchExists(branch):
|
||||
stderr=subprocess.PIPE, stdout=subprocess.PIPE);
|
||||
return proc.wait() == 0;
|
||||
|
||||
_gitConfig = {}
|
||||
def gitConfig(key):
|
||||
return read_pipe("git config %s" % key, ignore_error=True).strip()
|
||||
if not _gitConfig.has_key(key):
|
||||
_gitConfig[key] = read_pipe("git config %s" % key, ignore_error=True).strip()
|
||||
return _gitConfig[key]
|
||||
|
||||
def p4BranchesInGit(branchesAreInRemotes = True):
|
||||
branches = {}
|
||||
|
Loading…
Reference in New Issue
Block a user