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:
Patrick Steinhardt
2025-09-23 12:17:04 +02:00
committed by Junio C Hamano
parent 14aaf5c9d8
commit fe835b0ca0
5 changed files with 10 additions and 12 deletions

4
odb.h
View File

@@ -3,7 +3,6 @@
#include "hashmap.h"
#include "object.h"
#include "list.h"
#include "oidset.h"
#include "oidmap.h"
#include "string-list.h"
@@ -138,9 +137,6 @@ struct object_database {
* Should only be accessed directly by packfile.c and midx.c.
*/
struct packfile_store *packfiles;
/* A most-recently-used ordered version of the packed_git list. */
struct list_head packed_git_mru;
struct {
struct packed_git **packs;
unsigned flags;