diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-12-19 14:45:35 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-19 14:45:35 -0800 |
commit | 06cd5a1e01328724b7709ac232e36263e59f5f26 (patch) | |
tree | cd234c23f5d18c2e60ea61b33f1a6b98c08d8619 /t | |
parent | Merge branch 'jk/trailers-placeholder-in-pretty' (diff) | |
parent | rebase: add --quit to cleanup rebase, leave everything else untouched (diff) | |
download | tgif-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 't')
-rwxr-xr-x | t/t3407-rebase-abort.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh index a6a6c40a98..910f218284 100755 --- a/t/t3407-rebase-abort.sh +++ b/t/t3407-rebase-abort.sh @@ -99,4 +99,28 @@ testrebase() { testrebase "" .git/rebase-apply testrebase " --merge" .git/rebase-merge +test_expect_success 'rebase --quit' ' + cd "$work_dir" && + # Clean up the state from the previous one + git reset --hard pre-rebase && + test_must_fail git rebase master && + test_path_is_dir .git/rebase-apply && + head_before=$(git rev-parse HEAD) && + git rebase --quit && + test $(git rev-parse HEAD) = $head_before && + test ! -d .git/rebase-apply +' + +test_expect_success 'rebase --merge --quit' ' + cd "$work_dir" && + # Clean up the state from the previous one + git reset --hard pre-rebase && + test_must_fail git rebase --merge master && + test_path_is_dir .git/rebase-merge && + head_before=$(git rev-parse HEAD) && + git rebase --quit && + test $(git rev-parse HEAD) = $head_before && + test ! -d .git/rebase-merge +' + test_done |