aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2014-06-15 19:00:28 +0200
committerJunio C Hamano <gitster@pobox.com>2014-07-14 12:06:15 -0700
commit8ef85694a5f45dd22ea9d433066dcfad6b7ab73f (patch)
treee7bcc79c5fddc2bb941546e7c90d1a1f8821ae8e /t
parent48294e1ddb4e31531d3025da0a6bed54cc4b72ac (diff)
downloadgit-8ef85694a5f45dd22ea9d433066dcfad6b7ab73f.tar.gz
git-8ef85694a5f45dd22ea9d433066dcfad6b7ab73f.tar.xz
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')
-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 000000000..2eda6adeb
--- /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