aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-05-29 18:55:45 -0400
committerJunio C Hamano <gitster@pobox.com>2024-05-30 13:43:52 -0700
commit4cac79a50e242c8864e2c0f2fbf40e2d22b5fee6 (patch)
tree6d201ca07a334bb2f8b8853c551e716aa250403a
parentmidx: replace `get_midx_rev_filename()` with a generic helper (diff)
downloadgit-4cac79a50e242c8864e2c0f2fbf40e2d22b5fee6.tar.gz
git-4cac79a50e242c8864e2c0f2fbf40e2d22b5fee6.zip
pack-bitmap.c: reimplement `midx_bitmap_filename()` with helper
Now that we have the `get_midx_filename_ext()` helper, we can reimplement the `midx_bitmap_filename()` function in terms of it. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--pack-bitmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 35c5ef9d3c..fe8e8a51d3 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -309,9 +309,8 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
char *midx_bitmap_filename(struct multi_pack_index *midx)
{
struct strbuf buf = STRBUF_INIT;
-
- get_midx_filename(&buf, midx->object_dir);
- strbuf_addf(&buf, "-%s.bitmap", hash_to_hex(get_midx_checksum(midx)));
+ get_midx_filename_ext(&buf, midx->object_dir, get_midx_checksum(midx),
+ MIDX_EXT_BITMAP);
return strbuf_detach(&buf, NULL);
}