clone: check connectivity even if clone is partial
commita7e67c11b8b983b4a9f56f0b8990a550946ed6b0
authorJonathan Tan <jonathantanmy@google.com>
Fri, 6 Jul 2018 19:34:10 +0000 (6 12:34 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jul 2018 19:37:38 +0000 (9 12:37 -0700)
tree4d6c21ce1997eee50092820a068e69fcafc9feac
parenta0c9016abd566e9a8f988dcd387663cd0b2be078
clone: check connectivity even if clone is partial

The commit that introduced the partial clone feature - 548719fbdc
("clone: partial clone", 2017-12-08) - excluded connectivity checks
for partial clones, but this also meant that it is possible for a clone
to succeed, yet not have all objects either present or promised.
Specifically, if cloning with --filter=blob:none from a repository that
has a tag pointing to a blob, and the blob is not sent in the packfile,
the clone will pass, even if the blob is not referenced by any tree in
the packfile.

Turn on connectivity checks for partial clone.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c
t/t5616-partial-clone.sh