diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-04-17 10:28:18 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-17 10:28:18 -0700 |
| commit | c3ebf18eb2deac595bd2550c1076247d8cbf2bc1 (patch) | |
| tree | cbfe05bc8f89b8bde1e37b1a1e9cbfc3089f0f17 /t/t6437-submodule-merge.sh | |
| parent | fe7ae3b87ef866e4818a106e8ce6e3d821ed76d7 (diff) | |
| parent | 170e30d6957e1f7b8d88046ae122f98d57dca988 (diff) | |
| download | git-c3ebf18eb2deac595bd2550c1076247d8cbf2bc1.tar.gz | |
Merge branch 'en/merge-recursive-debug'
Remove remnants of the recursive merge strategy backend, which was
superseded by the ort merge strategy.
* en/merge-recursive-debug:
builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM
tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithm
merge-recursive.[ch]: thoroughly debug these
merge, sequencer: switch recursive merges over to ort
sequencer: switch non-recursive merges over to ort
merge-ort: enable diff-algorithms other than histogram
builtin/merge-recursive: switch to using merge_ort_generic()
checkout: replace merge_trees() with merge_ort_nonrecursive()
Diffstat (limited to 't/t6437-submodule-merge.sh')
| -rwxr-xr-x | t/t6437-submodule-merge.sh | 65 |
1 files changed, 20 insertions, 45 deletions
diff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh index 4815559157..a564758f52 100755 --- a/t/t6437-submodule-merge.sh +++ b/t/t6437-submodule-merge.sh @@ -9,7 +9,6 @@ GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1 export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB . ./test-lib.sh -. "$TEST_DIRECTORY"/lib-merge.sh # # history @@ -110,14 +109,10 @@ test_expect_success 'merging should conflict for non fast-forward' ' test_when_finished "git -C merge-search reset --hard" && (cd merge-search && git checkout -b test-nonforward-a b && - if test "$GIT_TEST_MERGE_ALGORITHM" = ort - then - test_must_fail git merge c 2>actual && - sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)" && - grep "$sub_expect" actual - else - test_must_fail git merge c 2> actual - fi) + test_must_fail git merge c 2>actual && + sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)" && + grep "$sub_expect" actual + ) ' test_expect_success 'finish setup for merge-search' ' @@ -151,14 +146,9 @@ test_expect_success 'merging should conflict for non fast-forward (resolution ex git checkout -b test-nonforward-b b && (cd sub && git rev-parse --short sub-d > ../expect) && - if test "$GIT_TEST_MERGE_ALGORITHM" = ort - then - test_must_fail git merge c >actual 2>sub-actual && - sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)" && - grep "$sub_expect" sub-actual - else - test_must_fail git merge c 2> actual - fi && + test_must_fail git merge c >actual 2>sub-actual && + sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)" && + grep "$sub_expect" sub-actual && grep $(cat expect) actual > /dev/null && git reset --hard) ' @@ -169,23 +159,12 @@ test_expect_success 'merging should fail for ambiguous common parent' ' (cd sub && git checkout -b ambiguous sub-b && git merge sub-c && - if test "$GIT_TEST_MERGE_ALGORITHM" = ort - then - git rev-parse --short sub-d >../expect1 && - git rev-parse --short ambiguous >../expect2 - else - git rev-parse sub-d > ../expect1 && - git rev-parse ambiguous > ../expect2 - fi + git rev-parse --short sub-d >../expect1 && + git rev-parse --short ambiguous >../expect2 ) && - if test "$GIT_TEST_MERGE_ALGORITHM" = ort - then - test_must_fail git merge c >actual 2>sub-actual && - sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)" && - grep "$sub_expect" sub-actual - else - test_must_fail git merge c 2> actual - fi && + test_must_fail git merge c >actual 2>sub-actual && + sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)" && + grep "$sub_expect" sub-actual && grep $(cat expect1) actual > /dev/null && grep $(cat expect2) actual > /dev/null && git reset --hard) @@ -227,11 +206,9 @@ test_expect_success 'merging should fail for changes that are backwards' ' git checkout -b test-backward e && test_must_fail git merge f 2>actual && - if test "$GIT_TEST_MERGE_ALGORITHM" = ort - then - sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-d)" && - grep "$sub_expect" actual - fi) + sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-d)" && + grep "$sub_expect" actual + ) ' @@ -358,7 +335,7 @@ test_expect_success 'setup file/submodule conflict' ' ) ' -test_expect_merge_algorithm failure success 'file/submodule conflict' ' +test_expect_success 'file/submodule conflict' ' test_when_finished "git -C file-submodule reset --hard" && ( cd file-submodule && @@ -467,7 +444,7 @@ test_expect_failure 'directory/submodule conflict; keep submodule clean' ' ) ' -test_expect_merge_algorithm failure success !FAIL_PREREQS 'directory/submodule conflict; should not treat submodule files as untracked or in the way' ' +test_expect_success !FAIL_PREREQS 'directory/submodule conflict; should not treat submodule files as untracked or in the way' ' test_when_finished "git -C directory-submodule/path reset --hard" && test_when_finished "git -C directory-submodule reset --hard" && ( @@ -535,11 +512,9 @@ test_expect_success 'merging should fail with no merge base' ' git add sub && git commit -m "b" && test_must_fail git merge a 2>actual && - if test "$GIT_TEST_MERGE_ALGORITHM" = ort - then - sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short HEAD^1)" && - grep "$sub_expect" actual - fi) + sub_expect="go to submodule (sub), and either merge commit $(git -C sub rev-parse --short HEAD^1)" && + grep "$sub_expect" actual + ) ' test_done |
