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

Re: [PATCH] fsck: do not loop infinitely when processing packs

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 23, 2026, 15:49 UTC
Message-ID
<xmqqy0kjo3yr.fsf@gitster.g>
In-Reply-To
<20260223071215.GA136463@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> Having to identify each potential spot and set a "btw, don't switch the
> pack list order!" flag seems error-prone. And also loses efficiency when
> you are iterating a pack and accessing objects in it (since we can't
> push that pack to the front of the MRU then, even though we'd expect
> there to be high locality with our iteration).

Ah, you said so clearly what I was feeling but I couldn't form into words. Using a stable second list to stably iterate over it for a codepath like the fsck does sound a lot less error prone.

Previous: Jeff KingNext: Patrick Steinhardt
Message 9 of 14 in “fsck: do not loop infinitely when processing packs”
  1. fsck: do not loop infinitely when processing packsbrian m. carlson, Feb 22, 2026
  2. Junio C HamanoFeb 22, 2026
  3. brian m. carlsonFeb 22, 2026
  4. Jeff KingFeb 23, 2026
  5. Patrick SteinhardtFeb 23, 2026
  6. Jeff KingFeb 23, 2026
  7. Patrick SteinhardtFeb 23, 2026
  8. Jeff KingFeb 23, 2026
  9. Junio C HamanoFeb 23, 2026
  10. Patrick SteinhardtFeb 23, 2026
  11. Jeff KingFeb 23, 2026
  12. Patrick SteinhardtFeb 23, 2026
  13. brian m. carlsonFeb 24, 2026
  14. Junio C HamanoFeb 24, 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.