odb: move list of packfiles into struct packfile_store

The object database tracks the list of packfiles it currently knows
about. With the introduction of the `struct packfile_store` we have a
better place to host this list though.

Move the list accordingly. Extract the logic from `odb_clear()` that
knows to close all such packfiles and move it into the new subsystem, as
well.

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:01 +02:00
committed by Junio C Hamano
parent b7983adb51
commit 535b7a667a
4 changed files with 41 additions and 29 deletions

1
odb.h
View File

@@ -138,7 +138,6 @@ struct object_database {
* should only be accessed directly by packfile.c
*/
struct packfile_store *packfiles;
struct packed_git *packed_git;
/* A most-recently-used ordered version of the packed_git list. */
struct list_head packed_git_mru;