bitmap_position_packfile(): convert to new revindex API
Replace find_revindex_position() with its counterpart in the new API, offset_to_pack_pos(). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Taylor Blau committed
Jan 13, 2021 at 17:23 UTC
57665086af39a6a9e1a911fd4871ff5eadc568c9
1 file changed
+4
-1
pack-bitmap.c
+4
-1
@@ -407,11 +407,14 @@ static inline int bitmap_position_extended(struct bitmap_index *bitmap_git,
407
static inline int bitmap_position_packfile(struct bitmap_index *bitmap_git,
408
const struct object_id *oid)
409
{
410
+ uint32_t pos;
411
off_t offset = find_pack_entry_one(oid->hash, bitmap_git->pack);
412
if (!offset)
413
return -1;
414
414
- return find_revindex_position(bitmap_git->pack, offset);
415
+ if (offset_to_pack_pos(bitmap_git->pack, offset, &pos) < 0)
416
+ return -1;
417
+ return pos;
418
}
419
420
static int bitmap_position(struct bitmap_index *bitmap_git,