"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()
@ -100,6 +100,10 @@ commit or stash your changes before running 'git merge'.
@@ -100,6 +100,10 @@ commit or stash your changes before running 'git merge'.
'git merge --abort' is equivalent to 'git reset --merge' when
`MERGE_HEAD` is present.
--quit::
Forget about the current merge in progress. Leave the index
and the working tree as-is.
--continue::
After a 'git merge' stops due to conflicts you can conclude the
merge by running 'git merge --continue' (see "HOW TO RESOLVE
@ -867,4 +867,30 @@ test_expect_success EXECKEEPSPID 'killed merge can be completed with --continue'
@@ -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 &&