summaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <Johannes.Schindelin@gmx.de>2008-05-16 11:23:03 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-05-16 13:03:55 -0700
commitbe4d2c83b68a96285cc05036add4d64d324e52d9 (patch)
treeb2400cbbd1d143ea912c0a311016a7d2f5c0794c /t/t7400-submodule-basic.sh
parentgit-fast-import: rename cmd_*() functions to parse_*() (diff)
downloadtgif-be4d2c83b68a96285cc05036add4d64d324e52d9.tar.xz
submodule update: add convenience option --init
When a submodule is not initialized and you do not want to change the defaults from .gitmodules anyway, you can now say $ git submodule update --init <name> When "update" is called without --init on an uninitialized submodule, a hint to use --init is printed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 2ef85a869d..6c7b902482 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -196,4 +196,17 @@ test_expect_success 'apply submodule diff' '
test -z "$D"
'
+test_expect_success 'update --init' '
+
+ mv init init2 &&
+ git config -f .gitmodules submodule.example.url "$(pwd)/init2" &&
+ git config --remove-section submodule.example
+ git submodule update init > update.out &&
+ grep "not initialized" update.out &&
+ test ! -d init/.git &&
+ git submodule update --init init &&
+ test -d init/.git
+
+'
+
test_done