Signed-off-by: Pete Wyckoff <[email protected]>
---
git-p4.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/git-p4.py b/git-p4.py
index 7efa9a8..ff3e8c9 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -560,13 +560,16 @@ def gitBranchExists(branch):
return proc.wait() == 0;
_gitConfig = {}
-def gitConfig(key, args = None): # set args to "--bool", for instance
+
+def gitConfig(key, args=None): # set args to "--bool", for instance
if not _gitConfig.has_key(key):
- argsFilter = ""
- if args != None:
- argsFilter = "%s " % args
- cmd = "git config %s%s" % (argsFilter, key)
- _gitConfig[key] = read_pipe(cmd, ignore_error=True).strip()
+ cmd = [ "git", "config" ]
+ if args:
+ assert(args == "--bool")
+ cmd.append(args)
+ cmd.append(key)
+ s = read_pipe(cmd, ignore_error=True)
+ _gitConfig[key] = s.strip()
return _gitConfig[key]
def gitConfigList(key):
--
1.8.1.1.460.g6fa8886
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html