Currently, a conflicted octopus merge leaves the repository in a "halfway into the merge state", where .git/MERGE_HEAD is missing but the files are listed as conflicted in the index and have conflict markers in them. It should either clean up everything, or add a MERGE_HEAD. Signed-off-by: Thomas Rast <trast@xxxxxxxxxxxxxxx> --- t/t7607-merge-octopus-cleanup.sh | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/t/t7607-merge-octopus-cleanup.sh b/t/t7607-merge-octopus-cleanup.sh new file mode 100755 index 0000000..4d82867 --- /dev/null +++ b/t/t7607-merge-octopus-cleanup.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +test_description='git merge + +Testing that conflicting octopus merge fails cleanly.' + +. ./test-lib.sh + +test_expect_success 'setup' ' + echo initial > foo && + git add foo && + git commit -m initial && + echo a > foo && + git commit -m a foo && + git checkout -b b HEAD^ && + echo b > foo && + git commit -m b foo && + git checkout -b c HEAD^ && + echo c > foo && + git commit -m c foo && + git checkout master +' + +test_expect_failure 'conflicted octopus merge' ' + test_must_fail git merge b c && + test -z "$(git ls-files --unmerged)" && + test "$(cat foo)" == a && + test ! -f .git/MERGE_HEAD +' + +test_done -- tg: (1293c95..) t/test-octopus-cleanup (depends on: origin/master) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html