summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-06-13 20:19:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-13 20:19:41 (GMT)
commitc4a38d161cbd3308825d7871d0f84f769aad04ab (patch)
tree7c2ea40857b1242030eff1a3cc4548941a152def /t
parent89d1b573d73e7c93f2190a08ed9430f42104c10b (diff)
parentf3f8311ec76f9bcdc7e26a125e585eb4e473a8d2 (diff)
downloadgit-c4a38d161cbd3308825d7871d0f84f769aad04ab.zip
git-c4a38d161cbd3308825d7871d0f84f769aad04ab.tar.gz
git-c4a38d161cbd3308825d7871d0f84f769aad04ab.tar.bz2
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')
-rwxr-xr-xt/t7600-merge.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 7f9c68c..3e16aae 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