aboutsummaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-19 14:45:35 -0800
committerJunio C Hamano <gitster@pobox.com>2016-12-19 14:45:35 -0800
commit06cd5a1e01328724b7709ac232e36263e59f5f26 (patch)
treecd234c23f5d18c2e60ea61b33f1a6b98c08d8619 /git-rebase.sh
parentf008159fc2dec7b98e74736751d3e6ad8d9c060f (diff)
parent9512177b68263085fef84cdbd45ecdee7bfe2377 (diff)
downloadgit-06cd5a1e01328724b7709ac232e36263e59f5f26.tar.gz
git-06cd5a1e01328724b7709ac232e36263e59f5f26.tar.xz
Merge branch 'nd/rebase-forget'
"git rebase" learned "--quit" option, which allows a user to remove the metadata left by an earlier "git rebase" that was manually aborted without using "git rebase --abort". * nd/rebase-forget: rebase: add --quit to cleanup rebase, leave everything else untouched
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 04f6e44bc..48d7c5ded 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -43,6 +43,7 @@ continue! continue
abort! abort and check out the original branch
skip! skip current patch and continue
edit-todo! edit the todo list during an interactive rebase
+quit! abort but keep HEAD where it is
"
. git-sh-setup
set_reflog_action rebase
@@ -241,7 +242,7 @@ do
--verify)
ok_to_skip_pre_rebase=
;;
- --continue|--skip|--abort|--edit-todo)
+ --continue|--skip|--abort|--quit|--edit-todo)
test $total_argc -eq 2 || usage
action=${1##--}
;;
@@ -399,6 +400,9 @@ abort)
finish_rebase
exit
;;
+quit)
+ exec rm -rf "$state_dir"
+ ;;
edit-todo)
run_specific_rebase
;;