From: Junio C Hamano Date: Thu, 3 Sep 2020 19:37:04 +0000 (-0700) Subject: Merge branch 'jt/lazy-fetch' X-Git-Tag: v2.29.0-rc0~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4100f366c1e5adf3a254cdc6f832aa1a4461053;p=thirdparty%2Fgit.git Merge branch 'jt/lazy-fetch' Updates to on-demand fetching code in lazily cloned repositories. * jt/lazy-fetch: fetch: no FETCH_HEAD display if --no-write-fetch-head fetch-pack: remove no_dependents code promisor-remote: lazy-fetch objects in subprocess fetch-pack: do not lazy-fetch during ref iteration fetch: only populate existing_refs if needed fetch: avoid reading submodule config until needed fetch: allow refspecs specified through stdin negotiator/noop: add noop fetch negotiator --- b4100f366c1e5adf3a254cdc6f832aa1a4461053 diff --cc fetch-pack.h index 5e747daea8,bbe2938059..736a3dae46 --- a/fetch-pack.h +++ b/fetch-pack.h @@@ -40,30 -40,8 +40,16 @@@ struct fetch_pack_args unsigned cloning:1; unsigned update_shallow:1; unsigned deepen:1; + + /* + * Indicate that the remote of this request is a promisor remote. The + * pack received does not need all referred-to objects to be present in + * the local object store, and fetch-pack will store the pack received + * together with a ".promisor" file indicating that the aforementioned + * pack is a promisor pack. + */ unsigned from_promisor:1; - /* - * Attempt to fetch only the wanted objects, and not any objects - * referred to by them. Due to protocol limitations, extraneous - * objects may still be included. (When fetching non-blob - * objects, only blobs are excluded; when fetching a blob, the - * blob itself will still be sent. The client does not need to - * know whether a wanted object is a blob or not.) - * - * If 1, fetch_pack() will also not modify any object flags. - * This allows fetch_pack() to safely be called by any function, - * regardless of which object flags it uses (if any). - */ - unsigned no_dependents:1; - /* * Because fetch_pack() overwrites the shallow file upon a * successful deepening non-clone fetch, if this struct diff --cc remote-curl.c index 0c1833dcb6,ce470f27b9..32cc4a0c55 --- a/remote-curl.c +++ b/remote-curl.c @@@ -39,11 -39,7 +39,10 @@@ struct options /* One of the SEND_PACK_PUSH_CERT_* constants. */ push_cert : 2, deepen_relative : 1, + + /* see documentation of corresponding flag in fetch-pack.h */ from_promisor : 1, + - no_dependents : 1, atomic : 1, object_format : 1; const struct git_hash_algo *hash_algo; diff --cc transport.h index 298d9eedc9,fe5a0a6662..ca409ea1e4 --- a/transport.h +++ b/transport.h @@@ -15,12 -15,8 +15,10 @@@ struct git_transport_options unsigned self_contained_and_connected : 1; unsigned update_shallow : 1; unsigned deepen_relative : 1; + + /* see documentation of corresponding flag in fetch-pack.h */ unsigned from_promisor : 1; - unsigned no_dependents : 1; - /* * If this transport supports connect or stateless-connect, * the corresponding field in struct fetch_pack_args is copied