]> Kevux Git Server - rit/commit
odb: stop including "odb/source.h"
authorPatrick Steinhardt <ps@pks.im>
Thu, 12 Mar 2026 08:42:56 +0000 (09:42 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Mar 2026 15:38:42 +0000 (08:38 -0700)
commit6daeb66baac581ab81148bcb9d5fcc61ae33347e
tree6910f914073c8af63434be9d36725251b56988b8
parent6cdef943d28fa7d6964ec570b33a0bff4c80ea8c
odb: stop including "odb/source.h"

The "odb.h" header currently includes the "odb/source.h" file. This is
somewhat roundabout though: most callers shouldn't have to care about
the `struct odb_source`, but should rather use the ODB-level functions.
Furthermore, it means that a couple of definitions have to live on the
source level even though they should be part of the generic interface.

Reverse the relation between "odb/source.h" and "odb.h" and move the
enums and typedefs that relate to the generic interfaces back into
"odb.h". Add the necessary includes to all files that rely on the
transitive include.

Suggested-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/multi-pack-index.c
builtin/submodule--helper.c
odb.h
odb/source.h
odb/streaming.c
repository.c
submodule-config.c
tmp-objdir.c