mirror of
https://github.com/git/git.git
synced 2024-05-28 06:56:10 +02:00
pack-bitmap.c: make pack_bitmap_filename() static
Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0fb1df4af2
commit
cb4680500a
|
@ -252,6 +252,20 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
|
||||||
return 0;
|
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)
|
static int open_pack_bitmap_1(struct packed_git *packfile)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
@ -322,20 +336,6 @@ static int load_pack_bitmap(void)
|
||||||
return -1;
|
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)
|
static int open_pack_bitmap(void)
|
||||||
{
|
{
|
||||||
struct packed_git *p;
|
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 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 traverse_bitmap_commit_list(show_reachable_fn show_reachable);
|
||||||
void test_bitmap_walk(struct rev_info *revs);
|
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 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 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);
|
int rebuild_existing_bitmaps(struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress);
|
||||||
|
|
Loading…
Reference in New Issue