Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-p4: Cache git config for performance
author
John Chapman
<thestar@fussycoder.id.au>
Sat, 8 Nov 2008 03:22:49 +0000
(14:22 +1100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 11 Nov 2008 22:50:03 +0000
(14:50 -0800)
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>
contrib/fast-import/git-p4
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
7f96e2e
)
diff --git
a/contrib/fast-import/git-p4
b/contrib/fast-import/git-p4
index 38d1a173339d3969fecc20193b31db136d35c7e3..9f0a5f92c1f01f82aba14fbf3b92fd56a1e0674b 100755
(executable)
--- a/
contrib/fast-import/git-p4
+++ b/
contrib/fast-import/git-p4
@@
-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 = {}