write_reuse_object(): convert to new revindex API
commit952fc6870d9594b364cf755e8419843b3049d98c
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 Jan 2021 22:23:35 +0000 (13 17:23 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jan 2021 05:53:45 +0000 (13 21:53 -0800)
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 <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c