diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-06-13 13:19:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-13 13:19:41 -0700 |
commit | c4a38d161cbd3308825d7871d0f84f769aad04ab (patch) | |
tree | 7c2ea40857b1242030eff1a3cc4548941a152def /t/t7600-merge.sh | |
parent | 89d1b573d73e7c93f2190a08ed9430f42104c10b (diff) | |
parent | f3f8311ec76f9bcdc7e26a125e585eb4e473a8d2 (diff) | |
download | git-c4a38d161cbd3308825d7871d0f84f769aad04ab.tar.gz |
Merge branch 'nd/merge-quit'
"git merge" learned "--quit" option that cleans up the in-progress
merge while leaving the working tree and the index still in a mess.
* nd/merge-quit:
merge: add --quit
merge: remove drop_save() in favor of remove_merge_branch_state()
Diffstat (limited to 't/t7600-merge.sh')
-rwxr-xr-x | t/t7600-merge.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 7f9c68cbe7..3e16aaed3b 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -867,4 +867,30 @@ test_expect_success EXECKEEPSPID 'killed merge can be completed with --continue' verify_parents $c0 $c1 ' +test_expect_success 'merge --quit' ' + git init merge-quit && + ( + cd merge-quit && + test_commit base && + echo one >>base.t && + git commit -am one && + git branch one && + git checkout base && + echo two >>base.t && + git commit -am two && + test_must_fail git -c rerere.enabled=true merge one && + test_path_is_file .git/MERGE_HEAD && + test_path_is_file .git/MERGE_MODE && + test_path_is_file .git/MERGE_MSG && + git rerere status >rerere.before && + git merge --quit && + test_path_is_missing .git/MERGE_HEAD && + test_path_is_missing .git/MERGE_MODE && + test_path_is_missing .git/MERGE_MSG && + git rerere status >rerere.after && + test_must_be_empty rerere.after && + ! test_cmp rerere.after rerere.before + ) +' + test_done |