summaryrefslogtreecommitdiff
path: root/t/t6402-merge-rename.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2022-07-23 01:53:14 +0000
committerJunio C Hamano <gitster@pobox.com>2022-07-22 21:45:23 -0700
commit8f240b8bbb63591f15c10e43debaf564e63a66bd (patch)
treec8196e3c6655afe3c14072ac3bc146281c31a021 /t/t6402-merge-rename.sh
parente4cdfe84a0d2ac560bf0a2ab0e9beade5f71a844 (diff)
downloadgit-8f240b8bbb63591f15c10e43debaf564e63a66bd.tar.gz
merge: do not abort early if one strategy fails to handle the merge
builtin/merge is setup to allow multiple strategies to be specified, and it will find the "best" result and use it. This is defeated if some of the merge strategies abort early when they cannot handle the merge. Fix the logic that calls recursive and ort to not do such an early abort, but instead return "2" or "unhandled" so that the next strategy can try to handle the merge. Coming up with a testcase for this is somewhat difficult, since recursive and ort both handle nearly any two-headed merge (there is a separate code path that checks for non-two-headed merges and already returns "2" for them). So use a somewhat synthetic testcase of having the index not match HEAD before the merge starts, since all merge strategies will abort for that. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6402-merge-rename.sh')
-rwxr-xr-xt/t6402-merge-rename.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6402-merge-rename.sh b/t/t6402-merge-rename.sh
index 3a32b1a45c..772238e582 100755
--- a/t/t6402-merge-rename.sh
+++ b/t/t6402-merge-rename.sh
@@ -210,7 +210,7 @@ test_expect_success 'updated working tree file should prevent the merge' '
echo >>M one line addition &&
cat M >M.saved &&
git update-index M &&
- test_expect_code 128 git pull --no-rebase . yellow &&
+ test_expect_code 2 git pull --no-rebase . yellow &&
test_cmp M M.saved &&
rm -f M.saved
'