]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pack-bitmap.c: reimplement `midx_bitmap_filename()` with helper
authorTaylor Blau <me@ttaylorr.com>
Wed, 29 May 2024 22:55:45 +0000 (18:55 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 May 2024 20:43:52 +0000 (13:43 -0700)
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>
pack-bitmap.c

index 35c5ef9d3cd15ed34ecc3e77aee0d0f8eba766a5..fe8e8a51d3017f9b3cd507dea4ea3e3f33b53930 100644 (file)
@@ -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);
 }