Merge git://git.kernel.org/pub/scm/gitk/gitk
[gitweb.git] / contrib / fast-import / git-p4
index 38d1a173339d3969fecc20193b31db136d35c7e3..9f0a5f92c1f01f82aba14fbf3b92fd56a1e0674b 100755 (executable)
@@ -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 = {}