Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2014-06-15 21:00:28 +0400
committerJunio C Hamano <gitster@pobox.com>2014-07-14 23:06:15 +0400
commit8ef85694a5f45dd22ea9d433066dcfad6b7ab73f (patch)
treee7bcc79c5fddc2bb941546e7c90d1a1f8821ae8e /t/t7112-reset-submodule.sh
parent48294e1ddb4e31531d3025da0a6bed54cc4b72ac (diff)
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 0000000000..2eda6adeb1
--- /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