diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-24 20:30:45 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-24 20:30:45 +0300 |
commit | 87ae8a1a950da28a2f75570ecaecbc9cd439c64c (patch) | |
tree | af7f39996045d70dd099d95a4d09683d420df800 /t | |
parent | 150f307afc13961b0322ad0e7205a7b193368586 (diff) | |
parent | 10d2f35436fb350c42bdb8396aee424a9bce44b5 (diff) |
Merge branch 'js/rebase-i-autosquash-fix'
"git rebase -i" did not clear the state files correctly when a run
of "squash/fixup" is aborted and then the user manually amended the
commit instead, which has been corrected.
* js/rebase-i-autosquash-fix:
rebase -i: be careful to wrap up fixup/squash chains
rebase -i --autosquash: demonstrate a problem skipping the last squash
Diffstat (limited to 't')
-rwxr-xr-x | t/t3415-rebase-autosquash.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh index e364c12622..13f5688135 100755 --- a/t/t3415-rebase-autosquash.sh +++ b/t/t3415-rebase-autosquash.sh @@ -330,4 +330,23 @@ test_expect_success 'wrapped original subject' ' test $base = $parent ' +test_expect_success 'abort last squash' ' + test_when_finished "test_might_fail git rebase --abort" && + test_when_finished "git checkout master" && + + git checkout -b some-squashes && + git commit --allow-empty -m first && + git commit --allow-empty --squash HEAD && + git commit --allow-empty -m second && + git commit --allow-empty --squash HEAD && + + test_must_fail git -c core.editor="grep -q ^pick" \ + rebase -ki --autosquash HEAD~4 && + : do not finish the squash, but resolve it manually && + git commit --allow-empty --amend -m edited-first && + git rebase --skip && + git show >actual && + ! grep first actual +' + test_done |