Skip to content

Commit b7927f3

Browse files
authored
Only check 'args.stash' when 'submit' or 'export' is used (#72)
1 parent e3cf3da commit b7927f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stack_pr/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ def main():
13701370
current_branch = get_current_branch_name()
13711371
get_branch_name_base(common_args.branch_name_template)
13721372
try:
1373-
if args.stash:
1373+
if args.command in ["submit", "export"] and args.stash:
13741374
run_shell_command(["git", "stash", "save"], quiet=not common_args.verbose)
13751375

13761376
if args.command != "view" and not is_repo_clean():
@@ -1403,7 +1403,7 @@ def main():
14031403
print_cmd_failure_details(exc)
14041404
raise
14051405
finally:
1406-
if args.stash:
1406+
if args.command in ["submit", "export"] and args.stash:
14071407
run_shell_command(["git", "stash", "pop"], quiet=not common_args.verbose)
14081408

14091409

0 commit comments

Comments
 (0)