]> git.99rst.org Git - git.git/commit
midx: teach `nth_bitmapped_pack()` about incremental MIDXs
authorTaylor Blau <redacted>
Tue, 6 Aug 2024 15:37:27 +0000 (11:37 -0400)
committerJunio C Hamano <redacted>
Tue, 6 Aug 2024 19:01:36 +0000 (12:01 -0700)
commit60750e1eb967c8622e7140037ec018a87577132b
tree9f4ab1a3189d35d0e9e11b5eddf6cec68a7fdbe5
parent26afb5afa16c9ea7825fdeae05e31d619849ad4b
midx: teach `nth_bitmapped_pack()` about incremental MIDXs

In a similar fashion as in previous commits, teach the function
`nth_bitmapped_pack()` about incremental MIDXs by translating the given
`pack_int_id` from the concatenated lexical order to a MIDX-local
lexical position.

When accessing the containing MIDX's array of packs, use the local pack
ID. Likewise, when reading the 'BTMP' chunk, use the MIDX-local offset
when accessing the data within that chunk.

(Note that the both the call to prepare_midx_pack() and the assignment
of bp->pack_int_id both care about the global pack_int_id, so avoid
shadowing the given 'pack_int_id' parameter).

Signed-off-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
midx.c
git clone https://git.99rst.org/PROJECT