зеркало из https://github.com/microsoft/git.git
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:
Родитель
0fb1df4af2
Коммит
cb4680500a
|
@ -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 @@ failed:
|
|||
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче