Git development
 help / color / mirror / Atom feed
* [PATCH 00/16] odb: make packed object source a proper `struct odb_source`
@ 2026-06-04 11:25 Patrick Steinhardt
  2026-06-04 11:25 ` [PATCH 01/16] packfile: rename `struct packfile_store` to `odb_source_packed` Patrick Steinhardt
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Patrick Steinhardt @ 2026-06-04 11:25 UTC (permalink / raw)
  To: git

Hi,

this patch series converts the "packed" source into a proper `struct
odb_source`. It's thus the equivalent to [1], which did the same thing
for the "loose" source.

This series here is unfortunately a bit bigger, mostly because I'm also
renaming `struct packfile_store` to `struct odb_source_packed`. Back
when I introduced the packfile store I didn't yet have the full vision
of how the final layout will look like, so I didn't have the foresight
yet to call it `struct odb_source_packed`. But now that the layout has
materialized I think it's sensible to adjust its naming to match all the
other sources that we have.

Also: I don't have anything else in the pipeline anymore that moves
around large pieces of our code in the vicinity of the object database.
So after this series got merged, subsequent changes should be of a more
incremental nature.

This series is built on top of 9ac3f193c0 (The 11th batch, 2026-06-02)
with ps/odb-source-loose at ef4778bcba (odb/source-loose: drop pointer
to the "files" source, 2026-06-01) merged into it.

Note that there's a trivial conflict with 8570d9ba31 (Merge branch
'wy/docs-typofixes' into seen, 2026-06-04) that can be solved like this:

diff --cc packfile.h
index ed49ab7f21,5729a37018..0000000000
--- a/packfile.h
+++ b/packfile.h
diff --git a/odb/source-packed.h b/odb/source-packed.h
index ef5a10b224..1d312f7dea 100644
--- a/odb/source-packed.h
+++ b/odb/source-packed.h
@@ -61,7 +61,7 @@ struct odb_source_packed {
         * that packs that contain a lot of accessed objects will be located
         * towards the front.
         *
-        * This is usually desireable, but there are exceptions. One exception
+        * This is usually desirable, but there are exceptions. One exception
         * is when the looking up multiple objects in a loop for each packfile.
         * In that case, we may easily end up with an infinite loop as the
         * packfiles get reordered to the front repeatedly.

Thanks!

Patrick

[1]: <20260521-b4-pks-odb-source-loose-v1-0-6553b399be2d@pks.im>

---
Patrick Steinhardt (16):
      packfile: rename `struct packfile_store` to `odb_source_packed`
      packfile: move packed source into "odb/" subsystem
      odb/source-packed: store pointer to "files" instead of generic source
      odb/source-packed: start converting to a proper `struct odb_source`
      odb/source-packed: wire up `close()` callback
      odb/source-packed: wire up `reprepare()` callback
      packfile: use higher-level interface to implement `has_object_pack()`
      odb/source-packed: wire up `read_object_info()` callback
      odb/source-packed: wire up `read_object_stream()` callback
      odb/source-packed: wire up `for_each_object()` callback
      odb/source-packed: wire up `count_objects()` callback
      odb/source-packed: wire up `find_abbrev_len()` callback
      odb/source-packed: wire up `freshen_object()` callback
      odb/source-packed: stub out remaining functions
      midx: refactor interfaces to work on "packed" source
      odb/source-packed: drop pointer to "files" parent source

 Makefile                   |   1 +
 builtin/cat-file.c         |   4 +-
 builtin/grep.c             |   2 +-
 builtin/multi-pack-index.c |  29 +-
 builtin/pack-objects.c     |   7 +-
 builtin/repack.c           |   8 +-
 commit-graph.c             |   4 +-
 meson.build                |   1 +
 midx-write.c               |  34 +-
 midx.c                     | 118 +++----
 midx.h                     |  30 +-
 odb/source-files.c         |  20 +-
 odb/source-files.h         |   4 +-
 odb/source-packed.c        | 764 +++++++++++++++++++++++++++++++++++++++++++++
 odb/source-packed.h        | 102 ++++++
 odb/source.h               |   3 +
 pack-bitmap.c              |   8 +-
 pack-revindex.c            |   6 +-
 packfile.c                 | 701 +----------------------------------------
 packfile.h                 | 166 +---------
 repack-geometry.c          |   3 +-
 repack-midx.c              |   9 +-
 repack.c                   |   6 +-
 t/helper/test-read-midx.c  |   7 +-
 24 files changed, 1054 insertions(+), 983 deletions(-)


---
base-commit: 06d49cec508464ced5d42541890ce5d749542a61
change-id: 20260602-pks-odb-source-packed-3826c352f059


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

end of thread, other threads:[~2026-06-08  6:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 11:25 [PATCH 00/16] odb: make packed object source a proper `struct odb_source` Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 01/16] packfile: rename `struct packfile_store` to `odb_source_packed` Patrick Steinhardt
2026-06-05 14:25   ` Karthik Nayak
2026-06-08  6:23     ` Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 02/16] packfile: move packed source into "odb/" subsystem Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 03/16] odb/source-packed: store pointer to "files" instead of generic source Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 04/16] odb/source-packed: start converting to a proper `struct odb_source` Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 05/16] odb/source-packed: wire up `close()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 06/16] odb/source-packed: wire up `reprepare()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 07/16] packfile: use higher-level interface to implement `has_object_pack()` Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 08/16] odb/source-packed: wire up `read_object_info()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 09/16] odb/source-packed: wire up `read_object_stream()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 10/16] odb/source-packed: wire up `for_each_object()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 11/16] odb/source-packed: wire up `count_objects()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 12/16] odb/source-packed: wire up `find_abbrev_len()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 13/16] odb/source-packed: wire up `freshen_object()` callback Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 14/16] odb/source-packed: stub out remaining functions Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 15/16] midx: refactor interfaces to work on "packed" source Patrick Steinhardt
2026-06-04 11:25 ` [PATCH 16/16] odb/source-packed: drop pointer to "files" parent source Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox