diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2020-08-17 21:01:35 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-18 13:25:05 -0700 |
commit | 5c3b801dab9d29c63c6c929405f808f064c11b77 (patch) | |
tree | 448659d58b4973732361afeb16ef28b813e443b1 /midx.c | |
parent | fetch: only populate existing_refs if needed (diff) | |
download | tgif-5c3b801dab9d29c63c6c929405f808f064c11b77.tar.xz |
fetch-pack: do not lazy-fetch during ref iteration
In order to determine negotiation tips, "fetch-pack" iterates over all
refs and dereferences all annotated tags found. This causes the
existence of targets of refs and annotated tags to be checked. Avoiding
this is especially important when we use "git fetch" (which invokes
"fetch-pack") to perform lazy fetches in a partial clone because a
target of such a ref or annotated tag may need to be itself lazy-fetched
(and otherwise causing an infinite loop).
Therefore, teach "fetch-pack" not to lazy fetch whenever iterating over
refs. This is done by using the raw form of ref iteration and by
dereferencing tags ourselves.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.c')
0 files changed, 0 insertions, 0 deletions