diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-08-19 00:20:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-24 00:12:06 +0200 |
commit | 6d6a80e06893f391b4aaafa8829f1cb3a0ac23f6 (patch) | |
tree | 3eb83242aeefbef11c436ee0437e088735646cc7 /packfile.c | |
parent | pack: move pack name-related functions (diff) | |
download | git-6d6a80e06893f391b4aaafa8829f1cb3a0ac23f6.tar.xz git-6d6a80e06893f391b4aaafa8829f1cb3a0ac23f6.zip |
pack: move static state variables
sha1_file.c declares some static variables that store packfile-related
state. Move them to packfile.c.
They are temporarily made global, but subsequent commits will restore
their scope back to static.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packfile.c b/packfile.c index 0d191dfd60..0f46e06175 100644 --- a/packfile.c +++ b/packfile.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "mru.h" char *odb_pack_name(struct strbuf *buf, const unsigned char *sha1, @@ -21,3 +22,16 @@ char *sha1_pack_index_name(const unsigned char *sha1) static struct strbuf buf = STRBUF_INIT; return odb_pack_name(&buf, sha1, "idx"); } + +unsigned int pack_used_ctr; +unsigned int pack_mmap_calls; +unsigned int peak_pack_open_windows; +unsigned int pack_open_windows; +unsigned int pack_open_fds; +unsigned int pack_max_fds; +size_t peak_pack_mapped; +size_t pack_mapped; +struct packed_git *packed_git; + +static struct mru packed_git_mru_storage; +struct mru *packed_git_mru = &packed_git_mru_storage; |