Patrick Steinhardt <ps@xxxxxx> writes: > 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. Nice. > This is the first step to make packfiles work with pluggable object > databases. Next steps will be to: > > - Move the `struct packed_git::next` and `struct packed::mru_head` > pointers into the packfile store so that `struct 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. Makes sense. Each packfile belong to a single $GIT_DIR/objects/ and together with loose object files in there form a set of objects in a single object store. When alternates are in effect, I think we still out of convenience link these packfiles taken from multiple places into a single list, which a series like this one may have to untangle. Thanks.