line-range.h: drop extern from function declaration
[gitweb.git] / t / t7415-submodule-names.sh
index 3c0f1a102a09e5c03cd6e270bbbf32d870b5c093..293e2e1963962e49afa10882439b5106607439a1 100755 (executable)
@@ -122,6 +122,16 @@ test_expect_success 'transfer.fsckObjects handles odd pack (index)' '
        test_must_fail git -C dst.git index-pack --strict --stdin <odd.pack
 '
 
+test_expect_success 'index-pack --strict works for non-repo pack' '
+       rm -rf dst.git &&
+       git init --bare dst.git &&
+       cp odd.pack dst.git &&
+       test_must_fail git -C dst.git index-pack --strict odd.pack 2>output &&
+       # Make sure we fail due to bad gitmodules content, not because we
+       # could not read the blob in the first place.
+       grep gitmodulesName output
+'
+
 test_expect_success 'fsck detects symlinked .gitmodules file' '
        git init symlink &&
        (
@@ -166,4 +176,19 @@ test_expect_success 'fsck detects non-blob .gitmodules' '
        )
 '
 
+test_expect_success 'fsck detects corrupt .gitmodules' '
+       git init corrupt &&
+       (
+               cd corrupt &&
+
+               echo "[broken" >.gitmodules &&
+               git add .gitmodules &&
+               git commit -m "broken gitmodules" &&
+
+               git fsck 2>output &&
+               grep gitmodulesParse output &&
+               test_i18ngrep ! "bad config" output
+       )
+'
+
 test_done