aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-03-12 09:42:56 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-12 08:38:42 -0700
commit6daeb66baac581ab81148bcb9d5fcc61ae33347e (patch)
tree6910f914073c8af63434be9d36725251b56988b8 /builtin
parent6cdef943d28fa7d6964ec570b33a0bff4c80ea8c (diff)
downloadgit-6daeb66baac581ab81148bcb9d5fcc61ae33347e.tar.xz
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/multi-pack-index.c1
-rw-r--r--builtin/submodule--helper.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 5f364aa816..3fcb207f1a 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -9,6 +9,7 @@
#include "strbuf.h"
#include "trace2.h"
#include "odb.h"
+#include "odb/source.h"
#include "replace-object.h"
#include "repository.h"
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 143f7cb3cc..4957487536 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -29,6 +29,7 @@
#include "object-file.h"
#include "object-name.h"
#include "odb.h"
+#include "odb/source.h"
#include "advice.h"
#include "branch.h"
#include "list-objects-filter-options.h"