Skip to content

Commit 4cac79a

Browse files
ttaylorrgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent defba63 commit 4cac79a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pack-bitmap.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,8 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
309309
char *midx_bitmap_filename(struct multi_pack_index *midx)
310310
{
311311
struct strbuf buf = STRBUF_INIT;
312-
313-
get_midx_filename(&buf, midx->object_dir);
314-
strbuf_addf(&buf, "-%s.bitmap", hash_to_hex(get_midx_checksum(midx)));
312+
get_midx_filename_ext(&buf, midx->object_dir, get_midx_checksum(midx),
313+
MIDX_EXT_BITMAP);
315314

316315
return strbuf_detach(&buf, NULL);
317316
}

0 commit comments

Comments
 (0)