.mailmap: switch to Thomas Rast's personal address
[gitweb.git] / t / t7400-submodule-basic.sh
index a9dd7306c5e58257d4e4ee0d8f25890c62ab23a5..10f89bd0ce3656a1dee841d19582e5d1bfc9736a 100755 (executable)
@@ -18,6 +18,16 @@ test_expect_success 'setup - initial commit' '
        git branch initial
 '
 
+test_expect_success 'configuration parsing' '
+       test_when_finished "rm -f .gitmodules" &&
+       cat >.gitmodules <<-\EOF &&
+       [submodule "s"]
+               path
+               ignore
+       EOF
+       test_must_fail git status
+'
+
 test_expect_success 'setup - repository in init subdirectory' '
        mkdir init &&
        (
@@ -952,9 +962,24 @@ test_expect_success 'submodule with UTF-8 name' '
                git add sub &&
                git commit -m "init sub"
        ) &&
-       test_config core.precomposeunicode true &&
        git submodule add ./"$svname" &&
        git submodule >&2 &&
        test -n "$(git submodule | grep "$svname")"
 '
+
+test_expect_success 'submodule add clone shallow submodule' '
+       mkdir super &&
+       pwd=$(pwd)
+       (
+               cd super &&
+               git init &&
+               git submodule add --depth=1 file://"$pwd"/example2 submodule &&
+               (
+                       cd submodule &&
+                       test 1 = $(git log --oneline | wc -l)
+               )
+       )
+'
+
+
 test_done