summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t7415-submodule-names.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t7415-submodule-names.sh b/t/t7415-submodule-names.sh
index 541bd81684..3c0f1a102a 100755
--- a/t/t7415-submodule-names.sh
+++ b/t/t7415-submodule-names.sh
@@ -148,4 +148,22 @@ test_expect_success 'fsck detects symlinked .gitmodules file' '
)
'
+test_expect_success 'fsck detects non-blob .gitmodules' '
+ git init non-blob &&
+ (
+ cd non-blob &&
+
+ # As above, make the funny tree directly to avoid index
+ # restrictions.
+ mkdir subdir &&
+ cp ../.gitmodules subdir/file &&
+ git add subdir/file &&
+ git commit -m ok &&
+ git ls-tree HEAD | sed s/subdir/.gitmodules/ | git mktree &&
+
+ test_must_fail git fsck 2>output &&
+ grep gitmodulesBlob output
+ )
+'
+
test_done