From: Junio C Hamano Date: Wed, 04 Sep 2024 18:18:31 GMT Subject: Re: [PATCH 3/5] builtin/pack-objects.c: translate bit positions during pack-reuse Message-ID: In-Reply-To: <8998e51135e76061e603304a6b7bbe19893fc067.1724793201.git.me@ttaylorr.com> Taylor Blau writes: > Instead, make sure that we translate bit positions in the MIDX's > pseudo-pack order to pack positions in the respective source packs by: > > - Translating the bit position (pseudo-pack order) to a MIDX position > (lexical order). > > - Use the MIDX position to obtain the offset at which the given object > occurs in the source pack. > > - Then translate that offset back into a pack relative position within > the source pack by calling offset_to_pack_pos(). Quite straight-forward, and the implementation below matches the design well.