packfile: carve out a new packfile store
Hi,
information about a object database's packfiles is currently distributed across two different structures:
-
struct packed_git
contains thenext
pointer as well as themru_head
, both of which serve to store the list of packfiles. -
struct object_database
contains several fields that relate to the packfiles.
So we don't really have a central data structure that tracks our packfiles, and consequently responsibilities aren't always clear cut. A consequence for the upcoming pluggable object databases is that this makes it very hard to move management of packfiles from the object database level down into the object database source.
This patch series introduces a new struct packfile_store
, which is
about to become the single source of truth for managing packfiles, and
carves out the packfile store subsystem.
This is the first step to make packfiles work with pluggable object databases. Next steps will be to:
-
Move the
struct packed_git::next
andstruct packed::mru_head
pointers into the packfile store so thatstruct packed_git
only tracks a single packfile. -
Push the
struct packfile_store
down one level so that it's not hosted by the object database anymore, but instead by the object database source.
Thanks!
Patrick
--- b4-submit-tracking ---
This section is used internally by b4 prep for tracking purposes.
{ "series": { "revision": 1, "change-id": "20250806-b4-pks-packfiles-store-a44a608ca396", "prefixes": [] } }
Part of Move packfile-related state out of `struct obje... (#547). Implements Compartmentalize packfile store (#599 - closed).