]>
Commit | Line | Data |
---|---|---|
558643e1 JL |
1 | #!/bin/sh |
2 | ||
3 | test_description='git apply handling submodules' | |
4 | ||
5 | . ./test-lib.sh | |
6 | . "$TEST_DIRECTORY"/lib-submodule-update.sh | |
7 | ||
8 | apply_index () { | |
5b0ac09f DL |
9 | git diff --ignore-submodules=dirty "..$1" >diff && |
10 | may_only_be_test_must_fail "$2" && | |
11 | $2 git apply --index diff | |
558643e1 JL |
12 | } |
13 | ||
aa06180a | 14 | test_submodule_switch_func "apply_index" |
558643e1 JL |
15 | |
16 | apply_3way () { | |
5b0ac09f DL |
17 | git diff --ignore-submodules=dirty "..$1" >diff && |
18 | may_only_be_test_must_fail "$2" && | |
19 | $2 git apply --3way diff | |
558643e1 JL |
20 | } |
21 | ||
aa06180a | 22 | test_submodule_switch_func "apply_3way" |
558643e1 JL |
23 | |
24 | test_done |