summaryrefslogtreecommitdiff
path: root/git_review
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-01-20 18:41:02 +0000
committerGerrit Code Review <review@openstack.org>2021-01-20 18:41:02 +0000
commit84264b9c880a168860f6ca4462e1796c37e3fc4f (patch)
tree009acd42c7f67692388d1841daf5876032d758d5 /git_review
parent96cfd92c8932941515d7c9825a236ab5fa80875d (diff)
parent9b585e00d8bd848dfdc5fb73475ffa1d5c5f4d9a (diff)
downloadgit-review-84264b9c880a168860f6ca4462e1796c37e3fc4f.tar.gz
Merge "Fix "git-review -d" erases work directory if on the same branch as the change downloaded"
Diffstat (limited to 'git_review')
-rw-r--r--git_review/cmd.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git_review/cmd.py b/git_review/cmd.py
index 4230892..bbf0bf9 100644
--- a/git_review/cmd.py
+++ b/git_review/cmd.py
@@ -1130,8 +1130,8 @@ class CheckoutExistingBranchFailed(CommandFailed):
EXIT_CODE = 65
-class ResetHardFailed(CommandFailed):
- "Failed to hard reset downloaded branch"
+class ResetKeepFailed(CommandFailed):
+ "Failed to reset downloaded branch"
EXIT_CODE = 66
@@ -1246,8 +1246,8 @@ def checkout_review(branch_name, remote, remote_branch):
raise BranchTrackingMismatch
run_command_exc(CheckoutExistingBranchFailed,
"git", "checkout", branch_name)
- run_command_exc(ResetHardFailed,
- "git", "reset", "--hard", "FETCH_HEAD")
+ run_command_exc(ResetKeepFailed,
+ "git", "reset", "--keep", "FETCH_HEAD")
else:
raise