Skip to content

Commit cb46805

Browse files
committed
pack-bitmap.c: make pack_bitmap_filename() static
Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0fb1df4 commit cb46805

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

pack-bitmap.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,20 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
252252
return 0;
253253
}
254254

255+
static char *pack_bitmap_filename(struct packed_git *p)
256+
{
257+
char *idx_name;
258+
int len;
259+
260+
len = strlen(p->pack_name) - strlen(".pack");
261+
idx_name = xmalloc(len + strlen(".bitmap") + 1);
262+
263+
memcpy(idx_name, p->pack_name, len);
264+
memcpy(idx_name + len, ".bitmap", strlen(".bitmap") + 1);
265+
266+
return idx_name;
267+
}
268+
255269
static int open_pack_bitmap_1(struct packed_git *packfile)
256270
{
257271
int fd;
@@ -322,20 +336,6 @@ static int load_pack_bitmap(void)
322336
return -1;
323337
}
324338

325-
char *pack_bitmap_filename(struct packed_git *p)
326-
{
327-
char *idx_name;
328-
int len;
329-
330-
len = strlen(p->pack_name) - strlen(".pack");
331-
idx_name = xmalloc(len + strlen(".bitmap") + 1);
332-
333-
memcpy(idx_name, p->pack_name, len);
334-
memcpy(idx_name + len, ".bitmap", strlen(".bitmap") + 1);
335-
336-
return idx_name;
337-
}
338-
339339
static int open_pack_bitmap(void)
340340
{
341341
struct packed_git *p;

pack-bitmap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ int prepare_bitmap_git(void);
3838
void count_bitmap_commit_list(uint32_t *commits, uint32_t *trees, uint32_t *blobs, uint32_t *tags);
3939
void traverse_bitmap_commit_list(show_reachable_fn show_reachable);
4040
void test_bitmap_walk(struct rev_info *revs);
41-
char *pack_bitmap_filename(struct packed_git *p);
4241
int prepare_bitmap_walk(struct rev_info *revs);
4342
int reuse_partial_packfile_from_bitmap(struct packed_git **packfile, uint32_t *entries, off_t *up_to);
4443
int rebuild_existing_bitmaps(struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress);

0 commit comments

Comments
 (0)