Skip to content

Commit aa2faac

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Reviewed-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 66b209b commit aa2faac

5 files changed

+22
-9
lines changed

t/t3512-cherry-pick-submodule.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
88
. ./test-lib.sh
99
. "$TEST_DIRECTORY"/lib-submodule-update.sh
1010

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
1316
test_submodule_switch "cherry-pick"
1417

1518
test_expect_success 'unrelated submodule/file conflict is ignored' '

t/t3513-revert-submodule.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ git_revert () {
3030
git revert HEAD
3131
}
3232

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
3437
test_submodule_switch_func "git_revert"
3538

3639
test_done

t/t5572-pull-submodule.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ git_pull_noff () {
4242
$2 git pull --no-ff
4343
}
4444

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
4750
test_submodule_switch_func "git_pull_noff"
4851

4952
test_expect_success 'pull --recurse-submodule setup' '

t/t6437-submodule-merge.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
66
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
77

88
. ./test-lib.sh
9+
. "$TEST_DIRECTORY"/lib-merge.sh
910

1011
#
1112
# history
@@ -328,7 +329,7 @@ test_expect_success 'setup file/submodule conflict' '
328329
)
329330
'
330331

331-
test_expect_failure 'file/submodule conflict' '
332+
test_expect_merge_algorithm failure success 'file/submodule conflict' '
332333
test_when_finished "git -C file-submodule reset --hard" &&
333334
(
334335
cd file-submodule &&
@@ -437,7 +438,7 @@ test_expect_failure 'directory/submodule conflict; keep submodule clean' '
437438
)
438439
'
439440

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' '
441442
test_when_finished "git -C directory-submodule/path reset --hard" &&
442443
test_when_finished "git -C directory-submodule reset --hard" &&
443444
(

t/t6438-submodule-directory-file-conflicts.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ test_submodule_switch "merge --ff"
1212

1313
test_submodule_switch "merge --ff-only"
1414

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
1720
test_submodule_switch "merge --no-ff"
1821

1922
test_done

0 commit comments

Comments
 (0)