Subject: Re: [PATCH 09/11] t: mark several submodule merging tests as fixed under merge-ort

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Mon, 08 Mar 2021 14:07:29 +0100

On Fri, Mar 05 2021, Elijah Newren via GitGitGadget wrote:

> From: Elijah Newren <[email-masked]>
>
> 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-masked]>
> ---
>  t/t3512-cherry-pick-submodule.sh              | 9 +++++++--
>  t/t3513-revert-submodule.sh                   | 7 ++++++-
>  t/t5572-pull-submodule.sh                     | 9 +++++++--
>  t/t6437-submodule-merge.sh                    | 5 +++--
>  t/t6438-submodule-directory-file-conflicts.sh | 9 +++++++--
>  5 files changed, 30 insertions(+), 9 deletions(-)
>
> diff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh
> index 822f2d4bfbd5..eb7a47b9d98a 100755
> --- a/t/t3512-cherry-pick-submodule.sh
> +++ b/t/t3512-cherry-pick-submodule.sh
> @@ -8,8 +8,13 @@ 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
> +	:  # No special additional KNOWN_FAILURE knobs to set
> +else
> +	KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
> +	KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
> +fi

nit: I think this and the rest would be just as readable/obvious without
the comment as:

    if test "$x" != ort
    then
            some_vars=xyz
    fi