git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Derrick Stolee" <dstolee@microsoft.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Taylor Blau" <me@ttaylorr.com>,
	"Jonathan Tan" <jonathantanmy@google.com>,
	"Jeff King" <peff@peff.net>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Derrick Stolee" <stolee@gmail.com>,
	"Elijah Newren" <newren@gmail.com>,
	"Elijah Newren" <newren@gmail.com>,
	"Elijah Newren" <newren@gmail.com>
Subject: [PATCH v2 08/13] t: mark several submodule merging tests as fixed under merge-ort
Date: Wed, 17 Mar 2021 21:28:00 +0000	[thread overview]
Message-ID: <f9325647a9fca1471fead860c18db86aba34eb54.1616016485.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.905.v2.git.1616016485.gitgitgadget@gmail.com>

From: Elijah Newren <newren@gmail.com>

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>
---
 t/t3512-cherry-pick-submodule.sh              | 7 +++++--
 t/t3513-revert-submodule.sh                   | 5 ++++-
 t/t5572-pull-submodule.sh                     | 7 +++++--
 t/t6437-submodule-merge.sh                    | 5 +++--
 t/t6438-submodule-directory-file-conflicts.sh | 7 +++++--
 5 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh
index 822f2d4bfbd5..c657840db33b 100755
--- a/t/t3512-cherry-pick-submodule.sh
+++ b/t/t3512-cherry-pick-submodule.sh
@@ -8,8 +8,11 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-submodule-update.sh
 
-KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
-KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+if test "$GIT_TEST_MERGE_ALGORITHM" != ort
+then
+	KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+	KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+fi
 test_submodule_switch "cherry-pick"
 
 test_expect_success 'unrelated submodule/file conflict is ignored' '
diff --git a/t/t3513-revert-submodule.sh b/t/t3513-revert-submodule.sh
index a759f12cbb1d..74cd96e58223 100755
--- a/t/t3513-revert-submodule.sh
+++ b/t/t3513-revert-submodule.sh
@@ -30,7 +30,10 @@ git_revert () {
 	git revert HEAD
 }
 
-KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+if test "$GIT_TEST_MERGE_ALGORITHM" != ort
+then
+	KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+fi
 test_submodule_switch_func "git_revert"
 
 test_done
diff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh
index 29537f4798ef..4f92a116e1f0 100755
--- a/t/t5572-pull-submodule.sh
+++ b/t/t5572-pull-submodule.sh
@@ -42,8 +42,11 @@ git_pull_noff () {
 	$2 git pull --no-ff
 }
 
-KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
-KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+if test "$GIT_TEST_MERGE_ALGORITHM" != ort
+then
+	KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+	KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+fi
 test_submodule_switch_func "git_pull_noff"
 
 test_expect_success 'pull --recurse-submodule setup' '
diff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh
index 0f92bcf326c8..e5e89c2045e7 100755
--- a/t/t6437-submodule-merge.sh
+++ b/t/t6437-submodule-merge.sh
@@ -6,6 +6,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-merge.sh
 
 #
 # history
@@ -328,7 +329,7 @@ test_expect_success 'setup file/submodule conflict' '
 	)
 '
 
-test_expect_failure 'file/submodule conflict' '
+test_expect_merge_algorithm failure success 'file/submodule conflict' '
 	test_when_finished "git -C file-submodule reset --hard" &&
 	(
 		cd file-submodule &&
@@ -437,7 +438,7 @@ test_expect_failure 'directory/submodule conflict; keep submodule clean' '
 	)
 '
 
-test_expect_failure !FAIL_PREREQS 'directory/submodule conflict; should not treat submodule files as untracked or in the way' '
+test_expect_merge_algorithm failure 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" &&
 	(
diff --git a/t/t6438-submodule-directory-file-conflicts.sh b/t/t6438-submodule-directory-file-conflicts.sh
index 04bf4be7d792..8df67a0ef99d 100755
--- a/t/t6438-submodule-directory-file-conflicts.sh
+++ b/t/t6438-submodule-directory-file-conflicts.sh
@@ -12,8 +12,11 @@ test_submodule_switch "merge --ff"
 
 test_submodule_switch "merge --ff-only"
 
-KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
-KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+if test "$GIT_TEST_MERGE_ALGORITHM" != ort
+then
+	KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+	KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+fi
 test_submodule_switch "merge --no-ff"
 
 test_done
-- 
gitgitgadget


  parent reply	other threads:[~2021-03-17 21:28 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  4:05 [PATCH 0/2] Declare merge-ort ready for general usage Elijah Newren via GitGitGadget
2021-03-16  4:05 ` [PATCH 1/2] Revert "merge-ort: ignore the directory rename split conflict for now" Elijah Newren via GitGitGadget
2021-03-16  4:05 ` [PATCH 2/2] t6423: mark remaining expected failure under merge-ort as such Elijah Newren via GitGitGadget
2021-03-16 17:01 ` [PATCH 0/2] Declare merge-ort ready for general usage Derrick Stolee
2021-03-16 17:25   ` Elijah Newren
2021-03-16 17:33     ` Derrick Stolee
2021-03-17 21:27 ` [PATCH v2 00/13] " Elijah Newren via GitGitGadget
2021-03-17 21:27   ` [PATCH v2 01/13] merge-ort: use STABLE_QSORT instead of QSORT where required Elijah Newren via GitGitGadget
2021-03-17 21:27   ` [PATCH v2 02/13] merge-ort: add a special minimal index just for renormalization Elijah Newren via GitGitGadget
2021-03-17 21:27   ` [PATCH v2 03/13] merge-ort: have ll_merge() use a special attr_index " Elijah Newren via GitGitGadget
2021-03-17 21:27   ` [PATCH v2 04/13] merge-ort: let renormalization change modify/delete into clean delete Elijah Newren via GitGitGadget
2021-03-17 21:27   ` [PATCH v2 05/13] merge-ort: support subtree shifting Elijah Newren via GitGitGadget
2021-03-17 21:27   ` [PATCH v2 06/13] t6428: new test for SKIP_WORKTREE handling and conflicts Elijah Newren via GitGitGadget
2021-03-17 21:27   ` [PATCH v2 07/13] merge-ort: implement CE_SKIP_WORKTREE handling with conflicted entries Elijah Newren via GitGitGadget
2021-03-17 21:28   ` Elijah Newren via GitGitGadget [this message]
2021-03-17 21:28   ` [PATCH v2 09/13] merge-ort: write $GIT_DIR/AUTO_MERGE whenever we hit a conflict Elijah Newren via GitGitGadget
2021-03-17 21:28   ` [PATCH v2 10/13] merge-recursive: add a bunch of FIXME comments documenting known bugs Elijah Newren via GitGitGadget
2021-03-17 21:28   ` [PATCH v2 11/13] Revert "merge-ort: ignore the directory rename split conflict for now" Elijah Newren via GitGitGadget
2021-03-17 21:28   ` [PATCH v2 12/13] t6423: mark remaining expected failure under merge-ort as such Elijah Newren via GitGitGadget
2021-03-17 21:28   ` [PATCH v2 13/13] Add testing with merge-ort merge strategy Elijah Newren via GitGitGadget
2021-03-19 13:05     ` Derrick Stolee
2021-03-19 15:21       ` Elijah Newren
2021-03-19 13:09   ` [PATCH v2 00/13] Declare merge-ort ready for general usage Derrick Stolee
2021-03-19 23:21     ` Elijah Newren
2021-03-19 23:35     ` Elijah Newren
2021-03-20  0:03   ` [PATCH v3 " Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 01/13] merge-ort: use STABLE_QSORT instead of QSORT where required Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 02/13] merge-ort: add a special minimal index just for renormalization Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 03/13] merge-ort: have ll_merge() use a special attr_index " Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 04/13] merge-ort: let renormalization change modify/delete into clean delete Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 05/13] merge-ort: support subtree shifting Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 06/13] t6428: new test for SKIP_WORKTREE handling and conflicts Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 07/13] merge-ort: implement CE_SKIP_WORKTREE handling with conflicted entries Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 08/13] t: mark several submodule merging tests as fixed under merge-ort Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 09/13] merge-ort: write $GIT_DIR/AUTO_MERGE whenever we hit a conflict Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 10/13] merge-recursive: add a bunch of FIXME comments documenting known bugs Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 11/13] Revert "merge-ort: ignore the directory rename split conflict for now" Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 12/13] t6423: mark remaining expected failure under merge-ort as such Elijah Newren via GitGitGadget
2021-03-20  0:03     ` [PATCH v3 13/13] Add testing with merge-ort merge strategy Elijah Newren via GitGitGadget
2021-03-20  1:49     ` [PATCH v3 00/13] Declare merge-ort ready for general usage Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9325647a9fca1471fead860c18db86aba34eb54.1616016485.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonathantanmy@google.com \
    --cc=jrnieder@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=stolee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).