diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-01-14 15:40:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-01-15 11:04:10 -0800 |
commit | cb4680500a3e72e0d5811659f9e4f46c8df91696 (patch) | |
tree | 33c56a02fbe5072dcf0c70c849e180ac6e46802e /pack-bitmap.c | |
parent | 0fb1df4af2a28bc95b26fbd9d4f172a461d88ef2 (diff) | |
download | git-cb4680500a3e72e0d5811659f9e4f46c8df91696.tar.gz |
pack-bitmap.c: make pack_bitmap_filename() static
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r-- | pack-bitmap.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c index 6a818419ca..0cd85f6c3a 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -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; |