Merge branch 'nd/submodule-unused-vars'
[gitweb.git] / t / t7416-submodule-dash-url.sh
index 459193c9765063f341c0aa17ee567073cd1b59ff..1cd2c1c1ea2d713c0b589df3ae9b34d43e5697a4 100755 (executable)
@@ -20,6 +20,13 @@ test_expect_success 'clone can recurse submodule' '
        test_cmp expect actual
 '
 
+test_expect_success 'fsck accepts protected dash' '
+       test_when_finished "rm -rf dst" &&
+       git init --bare dst &&
+       git -C dst config transfer.fsckObjects true &&
+       git push dst HEAD
+'
+
 test_expect_success 'remove ./ protection from .gitmodules url' '
        perl -i -pe "s{\./}{}" .gitmodules &&
        git commit -am "drop protection"
@@ -31,4 +38,12 @@ test_expect_success 'clone rejects unprotected dash' '
        test_i18ngrep ignoring err
 '
 
+test_expect_success 'fsck rejects unprotected dash' '
+       test_when_finished "rm -rf dst" &&
+       git init --bare dst &&
+       git -C dst config transfer.fsckObjects true &&
+       test_must_fail git push dst HEAD 2>err &&
+       grep gitmodulesUrl err
+'
+
 test_done