diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-13 23:50:31 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-13 23:50:32 +0900 |
commit | 5b51f0d38d24a21dc69a53e972497928183d399e (patch) | |
tree | f6a2e1ec6e7984f0550c1099bc210dc79627f345 /builtin | |
parent | Merge branch 'jh/trace2-sid-fix' (diff) | |
parent | t/perf: add perf script for partial clones (diff) | |
download | tgif-5b51f0d38d24a21dc69a53e972497928183d399e.tar.xz |
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')
-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 31a47d190a..ffdd94e8f6 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); |