diff options
author | Taylor Blau <me@ttaylorr.com> | 2021-08-31 22:52:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-01 22:56:43 +0200 |
commit | 0f533c728418fd3ef6ebcae5240e8df566cdaa72 (patch) | |
tree | 3b05aacecd6a5041b6f9bc165e7dd438830f393f /midx.c | |
parent | pack-bitmap.c: avoid redundant calls to try_partial_reuse (diff) | |
download | git-0f533c728418fd3ef6ebcae5240e8df566cdaa72.tar.xz git-0f533c728418fd3ef6ebcae5240e8df566cdaa72.zip |
pack-bitmap: read multi-pack bitmaps
This prepares the code in pack-bitmap to interpret the new multi-pack
bitmaps described in Documentation/technical/bitmap-format.txt, which
mostly involves converting bit positions to accommodate looking them up
in a MIDX.
Note that there are currently no writers who write multi-pack bitmaps,
and that this will be implemented in the subsequent commit. Note also
that get_midx_checksum() and get_midx_filename() are made non-static so
they can be called from pack-bitmap.c.
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -48,12 +48,12 @@ static uint8_t oid_version(void) } } -static const unsigned char *get_midx_checksum(struct multi_pack_index *m) +const unsigned char *get_midx_checksum(struct multi_pack_index *m) { return m->data + m->data_len - the_hash_algo->rawsz; } -static char *get_midx_filename(const char *object_dir) +char *get_midx_filename(const char *object_dir) { return xstrfmt("%s/pack/multi-pack-index", object_dir); } |