ls-files: don't needlessly pass around stage variable
[alt-git.git] / t / t3512-cherry-pick-submodule.sh
blob822f2d4bfbd5adc7d7dfce8d6f9c022ac2276b41
1 #!/bin/sh
3 test_description='cherry-pick can handle submodules'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8 . ./test-lib.sh
9 . "$TEST_DIRECTORY"/lib-submodule-update.sh
11 KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
12 KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
13 test_submodule_switch "cherry-pick"
15 test_expect_success 'unrelated submodule/file conflict is ignored' '
16 test_create_repo sub &&
18 touch sub/file &&
19 git -C sub add file &&
20 git -C sub commit -m "add a file in a submodule" &&
22 test_create_repo a_repo &&
24 cd a_repo &&
25 >a_file &&
26 git add a_file &&
27 git commit -m "add a file" &&
29 git branch test &&
30 git checkout test &&
32 mkdir sub &&
33 >sub/content &&
34 git add sub/content &&
35 git commit -m "add a regular folder with name sub" &&
37 echo "123" >a_file &&
38 git add a_file &&
39 git commit -m "modify a file" &&
41 git checkout main &&
43 git submodule add ../sub sub &&
44 git submodule update sub &&
45 git commit -m "add a submodule info folder with name sub" &&
47 git cherry-pick test
51 test_done