git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] refs/files: keep root refs out of loose ref cache

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2026, 15:05 UTC
Message-ID
<xmqqqzhpit2j.fsf@gitster.g>
In-Reply-To
<atHLkIADa6BlO_a-@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> On Thu, Oct 15, 2026 at 08:43:06PM +0100, Andy Koppe wrote:
>> Junio C Hamano <gitster@pobox.com> wrote:
>> > Patrick Steinhardt <ps@pks.im> writes:
>> > ...
So in short ...
>> >> This raises the question whether an alternative fix could have been to
>> >> teach the cache itself to skip over root refs in case the caller is not
>> >> interested in them. The answer may very well be a "no", but I would be
>> >> curious to learn why you settled on the proposed fix instead.
... with this cleared in the proposed log message of v2 iteration, ...
Show 10 quoted lines
>> A cleaner approach might be to drop the flag and change all call sites
>> that currently ask for all refs without setting the flag, so that they
>> explicitly ask for "refs/" only. That way root refs wouldn't need as
>> much special handling. But of course that would be a much bigger and
>> more risky change.
>
> That's fair. I guess the part that triggers me is that it's called a
> "cache" whereas we don't really use it as one in this instance. But
> that's a historical wart, and I agree that the proposed solution is good
> enough.
... the topic will be ready to go?
Thanks.
Previous: Patrick SteinhardtNext: Andy Koppe
Message 6 of 13 in “refs/files: keep root refs out of loose ref cache”
  1. refs/files: keep root refs out of loose ref cacheAndy Koppe, Oct 14, 2026
  2. Patrick SteinhardtOct 15, 2026
  3. Junio C HamanoOct 15, 2026
  4. Andy KoppeOct 15, 2026
  5. Patrick SteinhardtOct 16, 2026
  6. Junio C HamanoOct 16, 2026
  7. refs/files: keep root refs out of loose ref cacheAndy Koppe, Oct 17, 2026
  8. Patrick SteinhardtOct 19, 2026
  9. Andy KoppeOct 19, 2026
  10. refs/files: keep root refs out of loose ref cacheAndy Koppe, Oct 19, 2026
  11. Patrick SteinhardtOct 20, 2026
  12. Junio C HamanoOct 21, 2026
  13. Patrick SteinhardtOct 21, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.