Sync with 'master'
[alt-git.git] / t / t4137-apply-submodule.sh
blobebd0d4ad17c1bfbb1dcc231a32dbcb295496c7f7
1 #!/bin/sh
3 test_description='git apply handling submodules'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7 . "$TEST_DIRECTORY"/lib-submodule-update.sh
9 apply_index () {
10 git diff --ignore-submodules=dirty "..$1" >diff &&
11 may_only_be_test_must_fail "$2" &&
12 $2 git apply --index diff
15 test_submodule_switch_func "apply_index"
17 apply_3way () {
18 git diff --ignore-submodules=dirty "..$1" >diff &&
19 may_only_be_test_must_fail "$2" &&
20 $2 git apply --3way diff
23 test_submodule_switch_func "apply_3way"
25 test_done