summaryrefslogtreecommitdiff
path: root/t/t7112-reset-submodule.sh
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2014-06-15 17:00:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-14 19:06:15 (GMT)
commit8ef85694a5f45dd22ea9d433066dcfad6b7ab73f (patch)
treee7bcc79c5fddc2bb941546e7c90d1a1f8821ae8e /t/t7112-reset-submodule.sh
parent48294e1ddb4e31531d3025da0a6bed54cc4b72ac (diff)
downloadgit-8ef85694a5f45dd22ea9d433066dcfad6b7ab73f.zip
git-8ef85694a5f45dd22ea9d433066dcfad6b7ab73f.tar.gz
git-8ef85694a5f45dd22ea9d433066dcfad6b7ab73f.tar.bz2
reset: add t7112 for submodule updates
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>
Diffstat (limited to 't/t7112-reset-submodule.sh')
-rwxr-xr-xt/t7112-reset-submodule.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t7112-reset-submodule.sh b/t/t7112-reset-submodule.sh
new file mode 100755
index 0000000..2eda6ad
--- /dev/null
+++ b/t/t7112-reset-submodule.sh
@@ -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