Skip to content

Commit 558643e

Browse files
jlehmanngitster
authored andcommitted
apply: add t4137 for submodule updates
Test that the apply command updates the work tree as expected for the '--index' and the '--3way' options (for submodule changes which don't result in conflicts). Signed-off-by: Jens Lehmann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d78ecca commit 558643e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Diff for: t/t4137-apply-submodule.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 () {
9+
git diff --ignore-submodules=dirty "..$1" | git apply --index -
10+
}
11+
12+
test_submodule_switch "apply_index"
13+
14+
apply_3way () {
15+
git diff --ignore-submodules=dirty "..$1" | git apply --3way -
16+
}
17+
18+
test_submodule_switch "apply_3way"
19+
20+
test_done

0 commit comments

Comments
 (0)