write_reuse_object(): convert to new revindex API
authorTaylor Blau <redacted>
Wed, 13 Jan 2021 22:23:35 +0000 (17:23 -0500)
committerJunio C Hamano <redacted>
Thu, 14 Jan 2021 05:53:45 +0000 (21:53 -0800)
commit952fc6870d9594b364cf755e8419843b3049d98c
tree840a1acfd40da36b5bfa8beb5cfaf37b217948dc
parentf33fb6e419ab9ca27403c8207e53f27411028420
write_reuse_object(): convert to new revindex API

First replace 'find_pack_revindex()' with its replacement
'offset_to_pack_pos()'. This prevents any bogus OFS_DELTA that may make
its way through until 'write_reuse_object()' from causing a bad memory
read (if 'revidx' is 'NULL')

Next, replace a direct access of '->nr' with the wrapper function
'pack_pos_to_index()'.

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