summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2018-03-23 18:20:59 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-26 10:05:46 -0700
commita80d72db2a73174b3f22142eb2014b33696fd795 (patch)
tree1278f03e0783b80ab18a3cb5b680c4af3e1ef974 /cache.h
parentobject-store: free alt_odb_list (diff)
downloadtgif-a80d72db2a73174b3f22142eb2014b33696fd795.tar.xz
object-store: move packed_git and packed_git_mru to object store
In a process with multiple repositories open, packfile accessors should be associated to a single repository and not shared globally. Move packed_git and packed_git_mru into the_repository and adjust callers to reflect this. [nd: while at there, wrap access to these two fields in get_packed_git() and get_packed_git_mru(). This allows us to lazily initialize these fields without caller doing that explicitly] Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/cache.h b/cache.h
index 41530d5d16..d3429a0d48 100644
--- a/cache.h
+++ b/cache.h
@@ -1585,35 +1585,6 @@ struct pack_window {
unsigned int inuse_cnt;
};
-extern struct packed_git {
- struct packed_git *next;
- struct list_head mru;
- struct pack_window *windows;
- off_t pack_size;
- const void *index_data;
- size_t index_size;
- uint32_t num_objects;
- uint32_t num_bad_objects;
- unsigned char *bad_object_sha1;
- int index_version;
- time_t mtime;
- int pack_fd;
- unsigned pack_local:1,
- pack_keep:1,
- freshened:1,
- do_not_close:1,
- pack_promisor:1;
- unsigned char sha1[20];
- struct revindex_entry *revindex;
- /* something like ".git/objects/pack/xxxxx.pack" */
- char pack_name[FLEX_ARRAY]; /* more */
-} *packed_git;
-
-/*
- * A most-recently-used ordered version of the packed_git list.
- */
-extern struct list_head packed_git_mru;
-
struct pack_entry {
off_t offset;
unsigned char sha1[20];