@@ -71,10 +71,10 @@ def plugin_file(name):
71
71
return PLUGIN_DIRECTORY + '/' + name
72
72
73
73
74
- def do_when (conditional , callback , * args , ** kwargs ):
74
+ def do_when (conditional , command , * args , ** kwargs ):
75
75
if conditional ():
76
- return callback (* args , ** kwargs )
77
- sublime .set_timeout (functools .partial (do_when , conditional , callback , * args , ** kwargs ), 50 )
76
+ return command (* args , ** kwargs )
77
+ sublime .set_timeout (functools .partial (do_when , conditional , command , * args , ** kwargs ), 50 )
78
78
79
79
80
80
def goto_xy (view , line , col ):
@@ -228,7 +228,10 @@ def run_command(self, command, callback=None, show_status=True,
228
228
if wait_for_lock and root and os .path .exists (os .path .join (root , '.git' , 'index.lock' )):
229
229
print ("waiting for index.lock" , command )
230
230
do_when (lambda : not os .path .exists (os .path .join (root , '.git' , 'index.lock' )),
231
- self .run_command , command , callback = callback , show_status = show_status , filter_empty_args = filter_empty_args , no_save = no_save , wait_for_lock = wait_for_lock , ** kwargs )
231
+ self .run_command , command , callback = callback ,
232
+ show_status = show_status , filter_empty_args = filter_empty_args ,
233
+ no_save = no_save , wait_for_lock = wait_for_lock , ** kwargs )
234
+ return
232
235
233
236
s = sublime .load_settings ("Git.sublime-settings" )
234
237
if s .get ('save_first' ) and self .active_view () and self .active_view ().is_dirty () and not no_save :
0 commit comments