summaryrefslogtreecommitdiff
path: root/t/t7613-merge-submodule.sh
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2014-06-15 17:01:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-14 19:06:15 (GMT)
commit663ed39a889dae8beee2fc6953607f7660a5cddf (patch)
treecc0c59421dd5c7977f1fa9210e5506dff096c746 /t/t7613-merge-submodule.sh
parent8f8ba56b5b6321b07eba29bb7ae6a94b5ae0d34a (diff)
downloadgit-663ed39a889dae8beee2fc6953607f7660a5cddf.zip
git-663ed39a889dae8beee2fc6953607f7660a5cddf.tar.gz
git-663ed39a889dae8beee2fc6953607f7660a5cddf.tar.bz2
merge: add t7613 for submodule updates
Test that the merge command updates the work tree as expected (for submodule changes which don't result in conflicts) when used without arguments or with the '--ff', '--ff-only' and '--no-ff' flag. Implement the KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR switch to expect the known failure that --no-ff merges do not create the empty submodule directory. The KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES switch is also implemented to expect the known failure that --no-ff merges attempt to merge the new files in the former submodule directory with those of the removed submodule. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7613-merge-submodule.sh')
-rwxr-xr-xt/t7613-merge-submodule.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7613-merge-submodule.sh b/t/t7613-merge-submodule.sh
new file mode 100755
index 0000000..d1e9fcc
--- /dev/null
+++ b/t/t7613-merge-submodule.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test_description='merge can handle submodules'
+
+. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-submodule-update.sh
+
+# merges without conflicts
+test_submodule_switch "git merge"
+
+test_submodule_switch "git merge --ff"
+
+test_submodule_switch "git merge --ff-only"
+
+KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+test_submodule_switch "git merge --no-ff"
+
+test_done