]> git.ipfire.org Git - thirdparty/git.git/blame - t/t3512-cherry-pick-submodule.sh
merge-recursive: handle addition of submodule on our side of history
[thirdparty/git.git] / t / t3512-cherry-pick-submodule.sh
CommitLineData
283f56a4
JL
1#!/bin/sh
2
3test_description='cherry-pick can handle submodules'
4
5. ./test-lib.sh
6. "$TEST_DIRECTORY"/lib-submodule-update.sh
7
8KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
9KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
10KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
11test_submodule_switch "git cherry-pick"
12
c641ca67 13test_expect_success 'unrelated submodule/file conflict is ignored' '
89c4ee4e
SB
14 test_create_repo sub &&
15
16 touch sub/file &&
17 git -C sub add file &&
18 git -C sub commit -m "add a file in a submodule" &&
19
20 test_create_repo a_repo &&
21 (
22 cd a_repo &&
23 >a_file &&
24 git add a_file &&
25 git commit -m "add a file" &&
26
27 git branch test &&
28 git checkout test &&
29
30 mkdir sub &&
31 >sub/content &&
32 git add sub/content &&
33 git commit -m "add a regular folder with name sub" &&
34
35 echo "123" >a_file &&
36 git add a_file &&
37 git commit -m "modify a file" &&
38
39 git checkout master &&
40
41 git submodule add ../sub sub &&
42 git submodule update sub &&
43 git commit -m "add a submodule info folder with name sub" &&
44
45 git cherry-pick test
46 )
47'
48
283f56a4 49test_done