File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1370,15 +1370,14 @@ def main():
1370
1370
current_branch = get_current_branch_name ()
1371
1371
get_branch_name_base (common_args .branch_name_template )
1372
1372
try :
1373
- if args .stash :
1374
- run_shell_command (["git" , "stash" , "save" ], quiet = not common_args .verbose )
1375
-
1376
1373
if args .command != "view" and not is_repo_clean ():
1377
1374
error (ERROR_REPO_DIRTY )
1378
1375
return
1379
1376
common_args = deduce_base (common_args )
1380
1377
1381
1378
if args .command in ["submit" , "export" ]:
1379
+ if args .stash :
1380
+ run_shell_command (["git" , "stash" , "save" ], quiet = not common_args .verbose )
1382
1381
command_submit (
1383
1382
common_args ,
1384
1383
args .draft ,
@@ -1403,7 +1402,7 @@ def main():
1403
1402
print_cmd_failure_details (exc )
1404
1403
raise
1405
1404
finally :
1406
- if args .stash :
1405
+ if args .command in [ "submit" , "export" ] and args . stash :
1407
1406
run_shell_command (["git" , "stash" , "pop" ], quiet = not common_args .verbose )
1408
1407
1409
1408
You can’t perform that action at this time.
0 commit comments