Skip to content

Commit

Permalink
pack-bitmap.c: reimplement midx_bitmap_filename() with helper
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ttaylorr authored and gitster committed May 30, 2024
1 parent defba63 commit 4cac79a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pack-bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4cac79a

Please sign in to comment.