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.