File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -560,13 +560,16 @@ def gitBranchExists(branch):
560
560
return proc .wait () == 0 ;
561
561
562
562
_gitConfig = {}
563
- def gitConfig (key , args = None ): # set args to "--bool", for instance
563
+
564
+ def gitConfig (key , args = None ): # set args to "--bool", for instance
564
565
if not _gitConfig .has_key (key ):
565
- argsFilter = ""
566
- if args != None :
567
- argsFilter = "%s " % args
568
- cmd = "git config %s%s" % (argsFilter , key )
569
- _gitConfig [key ] = read_pipe (cmd , ignore_error = True ).strip ()
566
+ cmd = [ "git" , "config" ]
567
+ if args :
568
+ assert (args == "--bool" )
569
+ cmd .append (args )
570
+ cmd .append (key )
571
+ s = read_pipe (cmd , ignore_error = True )
572
+ _gitConfig [key ] = s .strip ()
570
573
return _gitConfig [key ]
571
574
572
575
def gitConfigList (key ):
You can’t perform that action at this time.
0 commit comments