summaryrefslogtreecommitdiff
path: root/t/t3512-cherry-pick-submodule.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3512-cherry-pick-submodule.sh')
-rwxr-xr-xt/t3512-cherry-pick-submodule.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh
index 6ece1d8573..c657840db3 100755
--- a/t/t3512-cherry-pick-submodule.sh
+++ b/t/t3512-cherry-pick-submodule.sh
@@ -2,11 +2,17 @@
test_description='cherry-pick can handle submodules'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+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' '
@@ -35,7 +41,7 @@ test_expect_success 'unrelated submodule/file conflict is ignored' '
git add a_file &&
git commit -m "modify a file" &&
- git checkout master &&
+ git checkout main &&
git submodule add ../sub sub &&
git submodule update sub &&