reset: add t7112 for submodule updates
authorJens Lehmann <Jens.Lehmann@web.de>
Sun, 15 Jun 2014 17:00:28 +0000 (19:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jul 2014 19:06:15 +0000 (12:06 -0700)
Test that the reset command updates the work tree as expected for changes
with '--keep', '--merge' (for changes which don't result in conflicts) and
'--hard'.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7112-reset-submodule.sh [new file with mode: 0755]
diff --git a/t/t7112-reset-submodule.sh b/t/t7112-reset-submodule.sh
new file mode 100755 (executable)
index 0000000..2eda6ad
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+test_description='reset can handle submodules'
+
+. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-submodule-update.sh
+
+test_submodule_switch "git reset --keep"
+
+test_submodule_switch "git reset --merge"
+
+test_submodule_forced_switch "git reset --hard"
+
+test_done