diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-13 14:50:31 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-13 14:50:32 (GMT) |
commit | 5b51f0d38d24a21dc69a53e972497928183d399e (patch) | |
tree | f6a2e1ec6e7984f0550c1099bc210dc79627f345 /builtin/clone.c | |
parent | 5b2d1c0c6eceb5fd6c9527bc2863179644dce840 (diff) | |
parent | 1bb10d4f7c074ac13a61d6d20be89c2bff9488a4 (diff) | |
download | git-5b51f0d38d24a21dc69a53e972497928183d399e.zip git-5b51f0d38d24a21dc69a53e972497928183d399e.tar.gz git-5b51f0d38d24a21dc69a53e972497928183d399e.tar.bz2 |
Merge branch 'js/partial-clone-connectivity-check'
During an initial "git clone --depth=..." partial clone, it is
pointless to spend cycles for a large portion of the connectivity
check that enumerates and skips promisor objects (which by
definition is all objects fetched from the other side). This has
been optimized out.
* js/partial-clone-connectivity-check:
t/perf: add perf script for partial clones
clone: do faster object check for partial clones
Diffstat (limited to 'builtin/clone.c')
-rw-r--r-- | builtin/clone.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 31a47d1..ffdd94e 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -660,7 +660,8 @@ static void update_remote_refs(const struct ref *refs, const char *branch_top, const char *msg, struct transport *transport, - int check_connectivity) + int check_connectivity, + int check_refs_only) { const struct ref *rm = mapped_refs; @@ -669,6 +670,7 @@ static void update_remote_refs(const struct ref *refs, opt.transport = transport; opt.progress = transport->progress; + opt.check_refs_only = !!check_refs_only; if (check_connected(iterate_ref_map, &rm, &opt)) die(_("remote did not send all necessary objects")); @@ -1230,7 +1232,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); + !is_local, filter_options.choice); update_head(our_head_points_at, remote_head, reflog_msg.buf); |