git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Start tracking packfiles per object database source
@ 2025-12-15  7:36 Patrick Steinhardt
  2025-12-15  7:36 ` [PATCH 01/10] packfile: create store via its owning source Patrick Steinhardt
                   ` (10 more replies)
  0 siblings, 11 replies; 32+ messages in thread
From: Patrick Steinhardt @ 2025-12-15  7:36 UTC (permalink / raw)
  To: git

Hi,

the `struct packfile_store` tracks packfiles we have in the repository
so that we can look up objects stored therein. Right now, the packfile
store is tracked on the object database level -- each object database
has exactly one packfile store. Consequently, we track packfiles that
are part of different object database sources via the same packfile
store.

This patch series refactors this so that we instead have one packfile
store per ODB source. This means that access to any object, regardless
of whether it is stored in a packfile or in a loose object, is always
done via its owning source.

This is the last step required for pluggable object databases: all
object access is routed through sources, and we can thus now abstract
these sources and then plug in a different implementation. Of course,
these abstractions are still very leaky, and we still reach into the
implementation details in a bunch of files. But this is something that
will be addressed over subsequent steps.

This series is built on top of d8af7cadaa (The eighth batch, 2025-12-14)
with the following two series merged into it:

  - ps/object-read-stream at 7b94028652 (streaming: drop redundant type
    and size pointers, 2025-11-23).

  - ps/odb-misc-fixes at 8915881686 (odb: properly close sources before
    freeing them, 2025-12-11).

The latter topic isn't in "next" yet, but the second version of this
topic only contains two small memory leak fixes. I don't expect it to
change, and I guess it should land soonish anyway.

Thanks!

Patrick

---
Patrick Steinhardt (10):
      packfile: create store via its owning source
      packfile: pass source to `prepare_pack()`
      packfile: refactor kept-pack cache to work with packfile stores
      packfile: refactor misleading code when unusing pack windows
      packfile: move packfile store into object source
      packfile: only prepare owning store in `packfile_store_get_packs()`
      packfile: only prepare owning store in `packfile_store_prepare()`
      packfile: inline `find_kept_pack_entry()`
      packfile: refactor `find_pack_entry()` to work on the packfile store
      packfile: move MIDX into packfile store

 builtin/fast-import.c  |  37 +++++---
 builtin/grep.c         |  10 ++-
 builtin/index-pack.c   |   2 +-
 builtin/pack-objects.c | 104 +++++++++++-----------
 http.c                 |   2 +-
 midx.c                 |  19 ++--
 odb.c                  |  44 ++++------
 odb.h                  |  11 +--
 odb/streaming.c        |   9 +-
 packfile.c             | 229 +++++++++++++++++++++++++++----------------------
 packfile.h             |  95 +++++++++++++++-----
 reachable.c            |   2 +-
 revision.c             |   8 +-
 13 files changed, 325 insertions(+), 247 deletions(-)


---
base-commit: a531cef344bcbcdca16c33bd34fbf4ec0065ab5e
change-id: 20251201-b4-pks-pack-store-via-source-fd43dc0765a7


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2025-12-18  6:55 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15  7:36 [PATCH 00/10] Start tracking packfiles per object database source Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 01/10] packfile: create store via its owning source Patrick Steinhardt
2025-12-15 21:30   ` Justin Tobler
2025-12-16  8:36     ` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 02/10] packfile: pass source to `prepare_pack()` Patrick Steinhardt
2025-12-15 21:38   ` Justin Tobler
2025-12-15  7:36 ` [PATCH 03/10] packfile: refactor kept-pack cache to work with packfile stores Patrick Steinhardt
2025-12-15 21:56   ` Justin Tobler
2025-12-16  9:09     ` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 04/10] packfile: refactor misleading code when unusing pack windows Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 05/10] packfile: move packfile store into object source Patrick Steinhardt
2025-12-18  0:52   ` Justin Tobler
2025-12-18  6:50     ` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 06/10] packfile: only prepare owning store in `packfile_store_get_packs()` Patrick Steinhardt
2025-12-18  0:58   ` Justin Tobler
2025-12-15  7:36 ` [PATCH 07/10] packfile: only prepare owning store in `packfile_store_prepare()` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 08/10] packfile: inline `find_kept_pack_entry()` Patrick Steinhardt
2025-12-18  1:06   ` Justin Tobler
2025-12-18  6:48     ` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 09/10] packfile: refactor `find_pack_entry()` to work on the packfile store Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 10/10] packfile: move MIDX into " Patrick Steinhardt
2025-12-18  6:55 ` [PATCH v2 00/10] Start tracking packfiles per object database source Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 01/10] packfile: create store via its owning source Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 02/10] packfile: pass source to `prepare_pack()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 03/10] packfile: refactor kept-pack cache to work with packfile stores Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 04/10] packfile: refactor misleading code when unusing pack windows Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 05/10] packfile: move packfile store into object source Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 06/10] packfile: only prepare owning store in `packfile_store_get_packs()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 07/10] packfile: only prepare owning store in `packfile_store_prepare()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 08/10] packfile: inline `find_kept_pack_entry()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 09/10] packfile: refactor `find_pack_entry()` to work on the packfile store Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 10/10] packfile: move MIDX into " Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).