Commit | Line | Data |
---|---|---|
4f39cd82 | 1 | #include "cache.h" |
6d6a80e0 | 2 | #include "mru.h" |
4f39cd82 JT |
3 | |
4 | char *odb_pack_name(struct strbuf *buf, | |
5 | const unsigned char *sha1, | |
6 | const char *ext) | |
7 | { | |
8 | strbuf_reset(buf); | |
9 | strbuf_addf(buf, "%s/pack/pack-%s.%s", get_object_directory(), | |
10 | sha1_to_hex(sha1), ext); | |
11 | return buf->buf; | |
12 | } | |
13 | ||
14 | char *sha1_pack_name(const unsigned char *sha1) | |
15 | { | |
16 | static struct strbuf buf = STRBUF_INIT; | |
17 | return odb_pack_name(&buf, sha1, "pack"); | |
18 | } | |
19 | ||
20 | char *sha1_pack_index_name(const unsigned char *sha1) | |
21 | { | |
22 | static struct strbuf buf = STRBUF_INIT; | |
23 | return odb_pack_name(&buf, sha1, "idx"); | |
24 | } | |
6d6a80e0 JT |
25 | |
26 | unsigned int pack_used_ctr; | |
27 | unsigned int pack_mmap_calls; | |
28 | unsigned int peak_pack_open_windows; | |
29 | unsigned int pack_open_windows; | |
30 | unsigned int pack_open_fds; | |
31 | unsigned int pack_max_fds; | |
32 | size_t peak_pack_mapped; | |
33 | size_t pack_mapped; | |
34 | struct packed_git *packed_git; | |
35 | ||
36 | static struct mru packed_git_mru_storage; | |
37 | struct mru *packed_git_mru = &packed_git_mru_storage; |