Re: [PATCH 3/5] builtin/pack-objects.c: translate bit positions during pack-reuse
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 4, 2024, 18:18 UTC
- Message-ID
- <xmqqh6av9tag.fsf@gitster.g>
- In-Reply-To
- <8998e51135e76061e603304a6b7bbe19893fc067.1724793201.git.me@ttaylorr.com>
Taylor Blau <me@ttaylorr.com> writes:
Show 11 quoted lines
> 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.