From: Patrick Steinhardt Date: Mon, 26 May 2025 07:23:56 GMT Subject: Re: [PATCH 2/5] midx-write.c: guard against incremental MIDXs in want_included_pack() Message-ID: In-Reply-To: On Sun, May 25, 2025 at 02:41:54PM -0400, Taylor Blau wrote: [snip] > So want_included_pack() is OK becuase it will never encounter a s/becuase/because/ > situation where it has to chase backwards through the '->base_midx' > pointer. But that is not immediately clear from reading the code, and is > too fragile for my comfort. Make this more clear by adding an ASSERT() > to the above effect. > > Apply the same treatment to each of the fill_included_packs-related > functions as well, since those are deceptively OK by the same reasoning. Ok. Patrick