Skip to content

Commit 5766508

Browse files
ttaylorrgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eb3fd99 commit 5766508

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pack-bitmap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,14 @@ static inline int bitmap_position_extended(struct bitmap_index *bitmap_git,
407407
static inline int bitmap_position_packfile(struct bitmap_index *bitmap_git,
408408
const struct object_id *oid)
409409
{
410+
uint32_t pos;
410411
off_t offset = find_pack_entry_one(oid->hash, bitmap_git->pack);
411412
if (!offset)
412413
return -1;
413414

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;
415418
}
416419

417420
static int bitmap_position(struct bitmap_index *bitmap_git,

0 commit comments

Comments
 (0)