OSDN Git Service

read-tree: add t1013 for submodule updates
authorJens Lehmann <Jens.Lehmann@web.de>
Sun, 15 Jun 2014 16:59:51 +0000 (18:59 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jul 2014 19:06:15 +0000 (12:06 -0700)
Test that the read-tree command updates the work tree as expected for
changes which don't result in conflicts with the '-m' and '--reset' flag.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1013-read-tree-submodule.sh [new file with mode: 0755]

diff --git a/t/t1013-read-tree-submodule.sh b/t/t1013-read-tree-submodule.sh
new file mode 100755 (executable)
index 0000000..20526ae
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+test_description='read-tree can handle submodules'
+
+. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-submodule-update.sh
+
+test_submodule_switch "git read-tree -u -m"
+
+test_submodule_forced_switch "git read-tree -u --reset"
+
+test_done