Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/packfile.c b/packfile.c
index efe0ed3e83..4eb65e4609 100644
--- a/packfile.c
+++ b/packfile.c
@@ -28,7 +28,7 @@ static unsigned int pack_used_ctr;
static unsigned int pack_mmap_calls;
static unsigned int peak_pack_open_windows;
static unsigned int pack_open_windows;
-unsigned int pack_open_fds;
+static unsigned int pack_open_fds;
static unsigned int pack_max_fds;
static size_t peak_pack_mapped;
static size_t pack_mapped;
@@ -658,3 +658,12 @@ struct packed_git *add_packed_git(const char *path, size_t path_len, int local)
hashclr(p->sha1);
return p;
}
+
+void install_packed_git(struct packed_git *pack)
+{
+ if (pack->pack_fd != -1)
+ pack_open_fds++;
+
+ pack->next = packed_git;
+ packed_git = pack;
+}