unpack_entry(): convert to new revindex API
commit0a7e3642bc0d42a2c322886e64872ac9d736fa84
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 Jan 2021 22:24:45 +0000 (13 17:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jan 2021 05:53:47 +0000 (13 21:53 -0800)
tree517f7f061419e0357e6d87f163eb72d4a33ec243
parentfc150caf67d91b0eeba359d63b4ce707aba8b5ca
unpack_entry(): convert to new revindex API

Remove direct manipulation of the 'struct revindex_entry' type as well
as calls to the deprecated API in 'packfile.c:unpack_entry()'. Usual
clean-up is performed (replacing '->nr' with calls to
'pack_pos_to_index()' and so on).

Add an additional check to make sure that 'obj_offset()' points at a
valid object. In the case this check is violated, we cannot call
'mark_bad_packed_object()' because we don't know the OID. At the top of
the call stack is do_oid_object_info_extended() (via
packed_object_info()), which does mark the object.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c