mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
odb: move MRU list of packfiles into struct packfile_store
The object database tracks the list of packfiles in most-recently-used order, which is mostly used to favor reading from packfiles that contain most of the objects that we're currently accessing. With the introduction of the `struct packfile_store` we have a better place to host this list though. Move the list accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
14aaf5c9d8
commit
fe835b0ca0
2
odb.c
2
odb.c
@@ -997,7 +997,6 @@ struct object_database *odb_new(struct repository *repo)
|
||||
memset(o, 0, sizeof(*o));
|
||||
o->repo = repo;
|
||||
o->packfiles = packfile_store_new(o);
|
||||
INIT_LIST_HEAD(&o->packed_git_mru);
|
||||
pthread_mutex_init(&o->replace_mutex, NULL);
|
||||
string_list_init_dup(&o->submodule_source_paths);
|
||||
return o;
|
||||
@@ -1035,7 +1034,6 @@ void odb_clear(struct object_database *o)
|
||||
free((char *) o->cached_objects[i].value.buf);
|
||||
FREE_AND_NULL(o->cached_objects);
|
||||
|
||||
INIT_LIST_HEAD(&o->packed_git_mru);
|
||||
close_object_store(o);
|
||||
packfile_store_free(o->packfiles);
|
||||
o->packfiles = NULL;
|
||||
|
||||
Reference in New Issue
Block a user