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

From: Junio C Hamano <[email-masked]>
Date: Mon, 23 Feb 2026 07:49:00 -0800

Jeff King <[email-masked]> writes:

> 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.