diff options
author | Jeff King <peff@peff.net> | 2018-05-05 01:40:08 +0200 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2018-05-22 05:55:12 +0200 |
commit | 6e328d6caef218db320978e3e251009135d87d0e (patch) | |
tree | e1d1fe6c3697352fb13c279cc7decf32581548cf /t/t7415-submodule-names.sh | |
parent | fsck: call fsck_finish() after fscking objects (diff) | |
download | git-6e328d6caef218db320978e3e251009135d87d0e.tar.xz git-6e328d6caef218db320978e3e251009135d87d0e.zip |
unpack-objects: call fsck_finish() after fscking objects
As with the previous commit, we must call fsck's "finish"
function in order to catch any queued objects for
.gitmodules checks.
This second pass will be able to access any incoming
objects, because we will have exploded them to loose objects
by now.
This isn't quite ideal, because it means that bad objects
may have been written to the object database (and a
subsequent operation could then reference them, even if the
other side doesn't send the objects again). However, this is
sufficient when used with receive.fsckObjects, since those
loose objects will all be placed in a temporary quarantine
area that will get wiped if we find any problems.
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to '')
-rwxr-xr-x | t/t7415-submodule-names.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t7415-submodule-names.sh b/t/t7415-submodule-names.sh index c8ce2f4717..7fdf5d68bd 100755 --- a/t/t7415-submodule-names.sh +++ b/t/t7415-submodule-names.sh @@ -77,4 +77,11 @@ test_expect_success 'fsck detects evil superproject' ' test_must_fail git fsck ' +test_expect_success 'transfer.fsckObjects detects evil superproject (unpack)' ' + rm -rf dst.git && + git init --bare dst.git && + git -C dst.git config transfer.fsckObjects true && + test_must_fail git push dst.git HEAD +' + test_done |