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> |
||
|---|---|---|
| .. | ||
| source-files.c | ||
| source-files.h | ||
| source-inmemory.c | ||
| source-inmemory.h | ||
| source-loose.c | ||
| source-loose.h | ||
| source-packed.c | ||
| source-packed.h | ||
| source.c | ||
| source.h | ||
| streaming.c | ||
| streaming.h | ||
| transaction.c | ||
| transaction.h | ||