Re: [PATCH 13/17] midx-write.c: enumerate `pack_int_id` values directly
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Dec 8, 2025, 18:27 UTC
- Message-ID
- <aTcYfOZ4_GdIwM9b@pks.im>
- In-Reply-To
- <8288afd8cc40a56999353643f49c48d610e6b3aa.1765053054.git.me@ttaylorr.com>
On Sat, Dec 06, 2025 at 03:31:37PM -0500, Taylor Blau wrote:
Show 11 quoted lines
> Our `midx-write.c::fill_packs_from_midx()` function currently enumerates > the range [0, m->num_packs), and then shifts its index variable up by > `m->num_packs_in_base` to produce a valid `pack_int_id`. > > Instead, directly enumerate the range: > > [m->num_packs_in_base, m->num_packs_in_base + m->num_packs) > > , which are the original pack_int_ids themselves as opposed to the > indexes of those packs relative to the MIDX layer they are contained > within.
Sensible. I was confused a bit by the previous change because I couldn't quite spot the shift happening. I think this makes things a bit easier to read.
Patrick