Re: [PATCH 2/5] midx-write.c: guard against incremental MIDXs in want_included_pack()
- From
Patrick Steinhardt <ps@pks.im>
- Date
- May 26, 2025, 07:23 UTC
- Message-ID
- <aDQXDOelx3fc8W2n@pks.im>
- In-Reply-To
- <d2f9645aa15b58824531fe5d981d2a73372b9482.1748198489.git.me@ttaylorr.com>
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/
Show 7 quoted lines
> 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