From a7e67c11b8b983b4a9f56f0b8990a550946ed6b0 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Fri, 6 Jul 2018 12:34:10 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/clone.c') diff --git a/builtin/clone.c b/builtin/clone.c index 8f86d99c51..fa53550758 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1201,7 +1201,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) update_remote_refs(refs, mapped_refs, remote_head_points_at, branch_top.buf, reflog_msg.buf, transport, - !is_local && !filter_options.choice); + !is_local); update_head(our_head_points_at, remote_head, reflog_msg.buf); -- cgit v1.2.3