From: Junio C Hamano <gitster@pobox.com>
To: Shubham Kanodia <shubham.kanodia10@gmail.com>
Cc: Shubham Kanodia via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, "Patrick Steinhardt [ ]" <ps@pks.im>,
"Derrick Stolee [ ]" <stolee@gmail.com>
Subject: Re: [PATCH] remote: introduce config to set prefetch refs
Date: Sun, 15 Sep 2024 09:12:27 -0700 [thread overview]
Message-ID: <xmqqbk0osxp0.fsf@gitster.g> (raw)
In-Reply-To: <xmqqo74qro6f.fsf@gitster.g> (Junio C. Hamano's message of "Sat, 14 Sep 2024 13:11:04 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Existing logic filteres them down to what matches configured
> remote.$name.fetch variable. filter_prefetch_refspec() may further
> reduces the result by removing those whose .src side begins with
> "refs/tags/".
>
> Now you only look at what survived the above existing filtering, and
> further narrow it down by picking only ones that match the prefetch
> condition. If the refspec that survived the filtering by the fetch
> refspec (and existing logic in filter_prefetch_refspec()) does not
> satisfy the prefetch condition, it won't be prefetched.
Sorry, but I misread the code.
By the time filter_prefetch_refspec() is called by get_ref_map(),
this caller has "remote_refs" linked list that describes each ref it
is going to fetch, so conceptually what is left for the prefetch
logic to do is to selectively discard the elements on this list that
are not worth asking the remote to send new object data for and use
the remainder of the list in remote_refs list, and the logic to
further limit this list with the prefetchref configuration would fit
well here, but filter_prefetch_refspec() does not work on this list
at all X-<. So the prefetchref limitation needs to come outside the
function.
next prev parent reply other threads:[~2024-09-15 16:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 9:47 [PATCH] remote: introduce config to set prefetch refs Shubham Kanodia via GitGitGadget
2024-09-09 9:51 ` Shubham Kanodia
2024-09-09 16:42 ` Junio C Hamano
2024-09-09 18:21 ` Shubham Kanodia
2024-09-09 18:33 ` Junio C Hamano
2024-09-13 6:16 ` Shubham Kanodia
2024-09-13 16:58 ` Junio C Hamano
2024-09-14 19:35 ` Shubham Kanodia
2024-09-14 20:11 ` Junio C Hamano
2024-09-15 14:06 ` Shubham Kanodia
2024-09-15 16:12 ` Junio C Hamano [this message]
2024-09-16 4:34 ` Shubham Kanodia
2024-09-15 14:08 ` [PATCH v2] " Shubham Kanodia via GitGitGadget
2024-09-19 10:23 ` [PATCH v3] " Shubham Kanodia via GitGitGadget
2024-09-23 21:24 ` Junio C Hamano
2024-10-07 14:30 ` Shubham Kanodia
2024-10-04 20:21 ` [PATCH v4] remote: allow specifying refs to prefetch Shubham Kanodia via GitGitGadget
2024-11-04 8:47 ` Shubham Kanodia
2024-11-05 6:45 ` Patrick Steinhardt
2024-11-05 14:47 ` Phillip Wood
2024-11-05 16:26 ` Shubham Kanodia
2024-11-06 0:39 ` Junio C Hamano
2024-11-06 6:52 ` Patrick Steinhardt
2024-11-06 8:20 ` Junio C Hamano
2024-11-06 6:46 ` Patrick Steinhardt
2024-11-06 11:04 ` Phillip Wood
2024-11-05 14:45 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbk0osxp0.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=ps@pks.im \
--cc=shubham.kanodia10@gmail.com \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).