summaryrefslogtreecommitdiff
path: root/pack-bitmap.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-01-13 22:23:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-01-14 05:53:45 (GMT)
commit57665086af39a6a9e1a911fd4871ff5eadc568c9 (patch)
tree494b35eca25ee62d35d6be01dd2677a980f9c533 /pack-bitmap.c
parenteb3fd99efd82bc8d199e01634e6fb521d3a27641 (diff)
downloadgit-57665086af39a6a9e1a911fd4871ff5eadc568c9.zip
git-57665086af39a6a9e1a911fd4871ff5eadc568c9.tar.gz
git-57665086af39a6a9e1a911fd4871ff5eadc568c9.tar.bz2
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>
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r--pack-bitmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index d88745f..d6861dd 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -407,11 +407,14 @@ static inline int bitmap_position_extended(struct bitmap_index *bitmap_git,
static inline int bitmap_position_packfile(struct bitmap_index *bitmap_git,
const struct object_id *oid)
{
+ uint32_t pos;
off_t offset = find_pack_entry_one(oid->hash, bitmap_git->pack);
if (!offset)
return -1;
- return find_revindex_position(bitmap_git->pack, offset);
+ if (offset_to_pack_pos(bitmap_git->pack, offset, &pos) < 0)
+ return -1;
+ return pos;
}
static int bitmap_position(struct bitmap_index *bitmap_git,