diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-10 01:25:41 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-10 01:25:41 +0300 |
commit | 88f95e49afe2684da7e8074d7782eba396604bdb (patch) | |
tree | ea9b4baa420118c64640dd0d23e403fdc797e613 /t | |
parent | 44275f5e1bef37304f5a9da65b588e344eb00a72 (diff) | |
parent | d559f502c59658ea1f360fd28d8909894e40a4fe (diff) |
Merge branch 'pw/rebase-abort-clean-rewritten'
"git rebase --abort" used to leave refs/rewritten/ when concluding
"git rebase -r", which has been corrected.
* pw/rebase-abort-clean-rewritten:
rebase --abort/--quit: cleanup refs/rewritten
sequencer: return errors from sequencer_remove_state()
rebase: warn if state directory cannot be removed
rebase: fix a memory leak
Diffstat (limited to 't')
-rwxr-xr-x | t/t3430-rebase-merges.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index 2315649f43..7b6c4847ad 100755 --- a/t/t3430-rebase-merges.sh +++ b/t/t3430-rebase-merges.sh @@ -237,8 +237,24 @@ test_expect_success 'refs/rewritten/* is worktree-local' ' test_cmp_rev HEAD "$(cat wt/b)" ' +test_expect_success '--abort cleans up refs/rewritten' ' + git checkout -b abort-cleans-refs-rewritten H && + GIT_SEQUENCE_EDITOR="echo break >>" git rebase -ir @^ && + git rev-parse --verify refs/rewritten/onto && + git rebase --abort && + test_must_fail git rev-parse --verify refs/rewritten/onto +' + +test_expect_success '--quit cleans up refs/rewritten' ' + git checkout -b quit-cleans-refs-rewritten H && + GIT_SEQUENCE_EDITOR="echo break >>" git rebase -ir @^ && + git rev-parse --verify refs/rewritten/onto && + git rebase --quit && + test_must_fail git rev-parse --verify refs/rewritten/onto +' + test_expect_success 'post-rewrite hook and fixups work for merges' ' - git checkout -b post-rewrite && + git checkout -b post-rewrite H && test_commit same1 && git reset --hard HEAD^ && test_commit same2 && |