Code

submodule update: add convenience option --init
[git.git] / t / t7400-submodule-basic.sh
index 2ef85a869d515b557815476f126386dc19f755c5..6c7b9024822024ca24f7d1ddea63c94d3aa016b0 100755 (executable)
@@ -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