summaryrefslogtreecommitdiff
path: root/t/t4137-apply-submodule.sh
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2014-06-15 16:59:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-14 19:06:15 (GMT)
commit558643e1d67496e72540c61b90d1f38067323fbf (patch)
treed1e53bc0ab231f02e0aae7bd803346929a388252 /t/t4137-apply-submodule.sh
parentd78ecca5206c65aff55573029b9fa2dd9c9cf4e1 (diff)
downloadgit-558643e1d67496e72540c61b90d1f38067323fbf.zip
git-558643e1d67496e72540c61b90d1f38067323fbf.tar.gz
git-558643e1d67496e72540c61b90d1f38067323fbf.tar.bz2
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 <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4137-apply-submodule.sh')
-rwxr-xr-xt/t4137-apply-submodule.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t4137-apply-submodule.sh b/t/t4137-apply-submodule.sh
new file mode 100755
index 0000000..a9bd40a
--- /dev/null
+++ b/t/t4137-apply-submodule.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+test_description='git apply handling submodules'
+
+. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-submodule-update.sh
+
+apply_index () {
+ git diff --ignore-submodules=dirty "..$1" | git apply --index -
+}
+
+test_submodule_switch "apply_index"
+
+apply_3way () {
+ git diff --ignore-submodules=dirty "..$1" | git apply --3way -
+}
+
+test_submodule_switch "apply_3way"
+
+test_done