git/odb
Patrick Steinhardt 32a95be604 odb: add `source` field to struct object_info_source
The previous commit introduced `struct object_info_source` as an opt-in
container for backend-specific information, but for now we only moved
preexisting data into this structure. Most importantly, the caller has
no way yet to learn about which source an object was actually looked up
from. Instead, callers have to rely on the `whence` enum to distinguish
the object type, but cannot use that enum to tell the object source.

Add a `struct odb_source *source` field to the structure and populate it
from each backend's lookup path.

The `whence` enum is still set and used by callers; it will be removed
in a subsequent commit now that `sourcep->source` can identify the
backend on its own.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-07-02 09:52:32 -07:00
..
source-files.c odb/source-packed: drop pointer to "files" parent source 2026-06-17 05:00:01 -07:00
source-files.h packfile: rename `struct packfile_store` to `odb_source_packed` 2026-06-17 04:59:59 -07:00
source-inmemory.c odb: add `source` field to struct object_info_source 2026-07-02 09:52:32 -07:00
source-inmemory.h odb/source-inmemory: convert to use oidtree 2026-05-15 04:50:45 +09:00
source-loose.c odb: add `source` field to struct object_info_source 2026-07-02 09:52:32 -07:00
source-loose.h odb/source-loose: drop pointer to the "files" source 2026-06-01 18:47:19 +09:00
source-packed.c packfile: thread odb_source_packed through packed_object_info() 2026-07-02 09:52:32 -07:00
source-packed.h odb/source-packed: drop pointer to "files" parent source 2026-06-17 05:00:01 -07:00
source.c odb/source: make `free()` function pluggable 2026-03-05 11:45:15 -08:00
source.h Merge branch 'ps/odb-source-packed' into ps/odb-drop-whence 2026-06-24 10:12:12 -07:00
streaming.c odb: use size_t for object_info.sizep and the size APIs 2026-06-15 07:45:41 -07:00
streaming.h Merge branch 'ps/odb-in-memory' into ps/odb-source-loose 2026-05-21 22:34:55 +09:00
transaction.c odb/transaction: make `write_object_stream()` pluggable 2026-05-15 04:44:40 +09:00
transaction.h odb/transaction: make `write_object_stream()` pluggable 2026-05-15 04:44:40 +09:00