summaryrefslogtreecommitdiff
path: root/midx.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-03-30 15:04:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-01 20:07:37 (GMT)
commit62f2c1b509e35baddcc4a57fd1c36d1a796e5440 (patch)
tree929a385565e97ac71194ee8caf40e99c6167cefe /midx.c
parent9f19161172412086f50b660a07731d636458cdc8 (diff)
downloadgit-62f2c1b509e35baddcc4a57fd1c36d1a796e5440.zip
git-62f2c1b509e35baddcc4a57fd1c36d1a796e5440.tar.gz
git-62f2c1b509e35baddcc4a57fd1c36d1a796e5440.tar.bz2
midx: make some functions non-static
In a subsequent commit, pack-revindex.c will become responsible for sorting a list of objects in the "MIDX pack order" (which will be defined in the following patch). To do so, it will need to be know the pack identifier and offset within that pack for each object in the MIDX. The MIDX code already has functions for doing just that (nth_midxed_offset() and nth_midxed_pack_int_id()), but they are statically declared. Since there is no reason that they couldn't be exposed publicly, and because they are already doing exactly what the caller in pack-revindex.c will want, expose them publicly so that they can be reused there. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.c')
-rw-r--r--midx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/midx.c b/midx.c
index 7af5145..a6f10dd 100644
--- a/midx.c
+++ b/midx.c
@@ -239,7 +239,7 @@ struct object_id *nth_midxed_object_oid(struct object_id *oid,
return oid;
}
-static off_t nth_midxed_offset(struct multi_pack_index *m, uint32_t pos)
+off_t nth_midxed_offset(struct multi_pack_index *m, uint32_t pos)
{
const unsigned char *offset_data;
uint32_t offset32;
@@ -258,7 +258,7 @@ static off_t nth_midxed_offset(struct multi_pack_index *m, uint32_t pos)
return offset32;
}
-static uint32_t nth_midxed_pack_int_id(struct multi_pack_index *m, uint32_t pos)
+uint32_t nth_midxed_pack_int_id(struct multi_pack_index *m, uint32_t pos)
{
return get_be32(m->chunk_object_offsets +
(off_t)pos * MIDX_CHUNK_OFFSET_WIDTH);