Git development
 help / color / mirror / Atom feed
* [PATCH 0/6] odb: refactor source-specific information in object info
@ 2026-06-24 12:19 Patrick Steinhardt
  2026-06-24 12:19 ` [PATCH 1/6] packfile: thread odb_source_packed through packed_object_info() Patrick Steinhardt
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Patrick Steinhardt @ 2026-06-24 12:19 UTC (permalink / raw)
  To: git

Hi,

this patch series refactors `struct object_info` to not contain the
`whence` field anymore.

This field only gave the caller information about the type of source
this was read from, but it didn't allow them to figure out which source
specifically yielded the object. So instead, we replace this information
with a new `struct object_info_source` field that both contains info
about the source, and any backend-specific data.

With this in place we can re-query the same backend for any given
object. More importantly though, we can eventually also use the backend-
specific data to also uniquely identify any given object, e.g. by
recording the packfile and offset, so that we can even yield the same
object in case one source contains the object multiple times.

Furthermore, with this change all information in `struct object_info` is
now following the same request-response-field style.

The series is built on top of 26d8d94e94 (A few more topics before -rc2,
2026-06-21) with ps/odb-source-packed at 1bba3c035d (odb/source-packed:
drop pointer to "files" parent source, 2026-06-17) merged into it.

Thanks!

Patrick

---
Patrick Steinhardt (6):
      packfile: thread odb_source_packed through packed_object_info()
      odb: make backend-specific fields optional
      odb: add `source` field to struct object_info_source
      treewide: convert users of `whence` to the new source field
      odb: drop `whence` field from object info
      odb: document object info fields

 builtin/cat-file.c     | 12 +++++---
 builtin/index-pack.c   |  9 ++++--
 builtin/pack-objects.c | 19 ++++++++----
 commit-graph.c         |  2 +-
 odb.c                  |  4 +--
 odb.h                  | 80 +++++++++++++++++++++++++++++++++++---------------
 odb/source-inmemory.c  |  3 +-
 odb/source-loose.c     |  4 +--
 odb/source-packed.c    |  4 +--
 pack-bitmap.c          |  2 +-
 packfile.c             | 45 ++++++++++++++++------------
 packfile.h             |  6 ++--
 reachable.c            |  7 +++--
 t/helper/test-bitmap.c |  2 +-
 14 files changed, 130 insertions(+), 69 deletions(-)


---
base-commit: 969dbd51a70f9105ee9965adec5c5a02e75ab5b3
change-id: 20260612-b4-pks-odb-drop-whence-1b0af9ab16f4


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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24 12:19 [PATCH 0/6] odb: refactor source-specific information in object info Patrick Steinhardt
2026-06-24 12:19 ` [PATCH 1/6] packfile: thread odb_source_packed through packed_object_info() Patrick Steinhardt
2026-06-24 12:19 ` [PATCH 2/6] odb: make backend-specific fields optional Patrick Steinhardt
2026-06-24 12:19 ` [PATCH 3/6] odb: add `source` field to struct object_info_source Patrick Steinhardt
2026-06-24 12:19 ` [PATCH 4/6] treewide: convert users of `whence` to the new source field Patrick Steinhardt
2026-06-24 12:19 ` [PATCH 5/6] odb: drop `whence` field from object info Patrick Steinhardt
2026-06-24 12:19 ` [PATCH 6/6] odb: document object info fields Patrick Steinhardt
2026-06-24 17:13 ` [PATCH 0/6] odb: refactor source-specific information in object info Junio C Hamano

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