| test_description='cherry-pick can handle submodules' |
| GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
| export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
| . "$TEST_DIRECTORY"/lib-submodule-update.sh |
| if test "$GIT_TEST_MERGE_ALGORITHM" != ort |
| KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1 |
| KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1 |
| test_submodule_switch "cherry-pick" |
| test_expect_success 'unrelated submodule/file conflict is ignored' ' |
| git -C sub commit -m "add a file in a submodule" && |
| test_create_repo a_repo && |
| git commit -m "add a file" && |
| git commit -m "add a regular folder with name sub" && |
| git commit -m "modify a file" && |
| git submodule add ../sub sub && |
| git submodule update sub && |
| git commit -m "add a submodule info folder with name sub" && |