summaryrefslogtreecommitdiff
path: root/t/t7415-submodule-names.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-05-02 21:20:35 (GMT)
committerJeff King <peff@peff.net>2018-05-22 03:55:12 (GMT)
commit1995b5e03e1cc97116be58cdc0502d4a23547856 (patch)
tree1d482dcd90f29be2e5758dc3aa1c5dc4eec479d3 /t/t7415-submodule-names.sh
parented8b10f631c9a71df3351d46187bf7f3fa4f9b7e (diff)
downloadgit-1995b5e03e1cc97116be58cdc0502d4a23547856.zip
git-1995b5e03e1cc97116be58cdc0502d4a23547856.tar.gz
git-1995b5e03e1cc97116be58cdc0502d4a23547856.tar.bz2
fsck: call fsck_finish() after fscking objects
Now that the internal fsck code is capable of checking .gitmodules files, we just need to teach its callers to use the "finish" function to check any queued objects. With this, we can now catch the malicious case in t7415 with git-fsck. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 't/t7415-submodule-names.sh')
-rwxr-xr-xt/t7415-submodule-names.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t7415-submodule-names.sh b/t/t7415-submodule-names.sh
index 75fa071..c8ce2f4 100755
--- a/t/t7415-submodule-names.sh
+++ b/t/t7415-submodule-names.sh
@@ -73,4 +73,8 @@ test_expect_success 'clone evil superproject' '
! grep "RUNNING POST CHECKOUT" output
'
+test_expect_success 'fsck detects evil superproject' '
+ test_must_fail git fsck
+'
+
test_done