Merge branch 'main' of github.com:git/git
[alt-git.git] / t / t4137-apply-submodule.sh
blob07d52625375d4bec97db0a14d74a4fd154681b5e
1 #!/bin/sh
3 test_description='git apply handling submodules'
5 . ./test-lib.sh
6 . "$TEST_DIRECTORY"/lib-submodule-update.sh
8 apply_index () {
9 git diff --ignore-submodules=dirty "..$1" >diff &&
10 may_only_be_test_must_fail "$2" &&
11 $2 git apply --index diff
14 test_submodule_switch_func "apply_index"
16 apply_3way () {
17 git diff --ignore-submodules=dirty "..$1" >diff &&
18 may_only_be_test_must_fail "$2" &&
19 $2 git apply --3way diff
22 test_submodule_switch_func "apply_3way"
24 test_done