Commit cb468050 authored by Junio C Hamano's avatar Junio C Hamano

pack-bitmap.c: make pack_bitmap_filename() static

Reviewed-by: default avatarJeff King <peff@peff.net>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 0fb1df4a
......@@ -252,6 +252,20 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
return 0;
}
static char *pack_bitmap_filename(struct packed_git *p)
{
char *idx_name;
int len;
len = strlen(p->pack_name) - strlen(".pack");
idx_name = xmalloc(len + strlen(".bitmap") + 1);
memcpy(idx_name, p->pack_name, len);
memcpy(idx_name + len, ".bitmap", strlen(".bitmap") + 1);
return idx_name;
}
static int open_pack_bitmap_1(struct packed_git *packfile)
{
int fd;
......@@ -322,20 +336,6 @@ static int load_pack_bitmap(void)
return -1;
}
char *pack_bitmap_filename(struct packed_git *p)
{
char *idx_name;
int len;
len = strlen(p->pack_name) - strlen(".pack");
idx_name = xmalloc(len + strlen(".bitmap") + 1);
memcpy(idx_name, p->pack_name, len);
memcpy(idx_name + len, ".bitmap", strlen(".bitmap") + 1);
return idx_name;
}
static int open_pack_bitmap(void)
{
struct packed_git *p;
......
......@@ -38,7 +38,6 @@ int prepare_bitmap_git(void);
void count_bitmap_commit_list(uint32_t *commits, uint32_t *trees, uint32_t *blobs, uint32_t *tags);
void traverse_bitmap_commit_list(show_reachable_fn show_reachable);
void test_bitmap_walk(struct rev_info *revs);
char *pack_bitmap_filename(struct packed_git *p);
int prepare_bitmap_walk(struct rev_info *revs);
int reuse_partial_packfile_from_bitmap(struct packed_git **packfile, uint32_t *entries, off_t *up_to);
int rebuild_existing_bitmaps(struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment