t: mark several submodule merging tests as fixed under merge-ort

merge-ort handles submodules (and directory/file conflicts in general) differently than merge-recursive does; it basically puts all the special handling for different filetypes into one place in the codebase instead of needing special handling for different filetypes in many different code paths. This one code path in merge-ort could perhaps use some work still (there are still test_expect_failure cases in the testsuite), but it passes all the tests that merge-recursive does as well as 12 additional ones that merge-recursive fails. Mark those 12 tests as test_expect_success under merge-ort. Signed-off-by: Elijah Newren <newren@gmail.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Mar 20, 2021 at 00:03 UTC aa2faac03ad646873ebac2b230581d1d26dd1b99
5 files changed +22 -9
t/t3512-cherry-pick-submodule.sh
+5 -2
@@ -8,8 +8,11 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8 . ./test-lib.sh
9 . "$TEST_DIRECTORY"/lib-submodule-update.sh
10
11 -KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
12 -KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
11 +if test "$GIT_TEST_MERGE_ALGORITHM" != ort
12 +then
13 + KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
14 + KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
15 +fi
16 test_submodule_switch "cherry-pick"
17
18 test_expect_success 'unrelated submodule/file conflict is ignored' '
t/t3513-revert-submodule.sh
+4 -1
@@ -30,7 +30,10 @@ git_revert () {
30 git revert HEAD
31 }
32
33 -KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
33 +if test "$GIT_TEST_MERGE_ALGORITHM" != ort
34 +then
35 + KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
36 +fi
37 test_submodule_switch_func "git_revert"
38
39 test_done
t/t5572-pull-submodule.sh
+5 -2
@@ -42,8 +42,11 @@ git_pull_noff () {
42 $2 git pull --no-ff
43 }
44
45 -KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
46 -KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
45 +if test "$GIT_TEST_MERGE_ALGORITHM" != ort
46 +then
47 + KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
48 + KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
49 +fi
50 test_submodule_switch_func "git_pull_noff"
51
52 test_expect_success 'pull --recurse-submodule setup' '
t/t6437-submodule-merge.sh
+3 -2
@@ -6,6 +6,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
8 . ./test-lib.sh
9 +. "$TEST_DIRECTORY"/lib-merge.sh
10
11 #
12 # history
@@ -328,7 +329,7 @@ test_expect_success 'setup file/submodule conflict' '
329 )
330 '
331
331 -test_expect_failure 'file/submodule conflict' '
332 +test_expect_merge_algorithm failure success 'file/submodule conflict' '
333 test_when_finished "git -C file-submodule reset --hard" &&
334 (
335 cd file-submodule &&
@@ -437,7 +438,7 @@ test_expect_failure 'directory/submodule conflict; keep submodule clean' '
438 )
439 '
440
440 -test_expect_failure !FAIL_PREREQS 'directory/submodule conflict; should not treat submodule files as untracked or in the way' '
441 +test_expect_merge_algorithm failure success !FAIL_PREREQS 'directory/submodule conflict; should not treat submodule files as untracked or in the way' '
442 test_when_finished "git -C directory-submodule/path reset --hard" &&
443 test_when_finished "git -C directory-submodule reset --hard" &&
444 (
t/t6438-submodule-directory-file-conflicts.sh
+5 -2
@@ -12,8 +12,11 @@ test_submodule_switch "merge --ff"
12
13 test_submodule_switch "merge --ff-only"
14
15 -KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
16 -KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
15 +if test "$GIT_TEST_MERGE_ALGORITHM" != ort
16 +then
17 + KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
18 + KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
19 +fi
20 test_submodule_switch "merge --no-ff"
21
22 test_done