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

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

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Feb 24, 2026, 22:23 UTC
Message-ID
<aZ4k5C_i_rK_yq68@fruit.crustytoothpaste.net>
In-Reply-To
<aZwTPfmyrFp-QAPq@pks.im>
On 2026-02-23 at 08:43:41, Patrick Steinhardt wrote:
Show 5 quoted lines
> Typically, we don't execute `find_pack_entry()` at all when verifying
> packfiles as we iterate through objects in packfile order. We thus don't
> have to look up objects via their object ID, but instead we do so by
> using their packfile offset. And this mechanism will not end up in
> `find_pack_entry()`, and thus we wouldn't update the MRU.

If you're thinking about `nth_packed_object_id`, that is index (object ID) order, not packfile order. I actually made this mistake when writing the interop code and having that function operate in pack order breaks a surprising number of things in very subtle ways, notably generating multi-pack indexes.

I will be sending a patch in the future documenting that requirement clearly.

> I've got a couple patches in the making that'll fix this.

I'm happy to drop this patch in favour of yours. Thanks for a quick response.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 13 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.