Subject: Re: [PATCH 3/5] builtin/pack-objects.c: translate bit positions during pack-reuse

From: Junio C Hamano <[email-masked]>
Date: Wed, 04 Sep 2024 11:18:31 -0700

Taylor Blau <[email-masked]> 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.