From: Patrick Steinhardt Date: Mon, 02 Nov 2026 11:20:21 GMT Subject: [PATCH 5/6] object-file: stop including "odb/source-loose.h" Message-ID: <20261102-pks-odb-loose-cleanups-v1-5-fbbc86c29693@pks.im> In-Reply-To: <20261102-pks-odb-loose-cleanups-v1-0-fbbc86c29693@pks.im> We have now moved all functionality that relate to the loose backend from "object-file.c" into the backend itself. Wrap up these refactorings by not including "odb/source-loose.h" anymore and instead include the file explicitly in all compilation units that require access to it. Like this we can trivially identify exactly those files that still depend on details of the loose backend itself and that thus require further work to become truly backend-agnostic. Signed-off-by: Patrick Steinhardt --- builtin/pack-objects.c | 1 + http-walker.c | 1 + http.c | 1 + loose.c | 1 + object-file.c | 1 + object-file.h | 2 +- setup.c | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index ca3a891dfbc..e53c69af31f 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -34,6 +34,7 @@ #include "object-file.h" #include "object-file-convert.h" #include "odb.h" +#include "odb/source-loose.h" #include "odb/streaming.h" #include "replace-object.h" #include "dir.h" diff --git a/http-walker.c b/http-walker.c index 4f50dd9b8d0..13730a27847 100644 --- a/http-walker.c +++ b/http-walker.c @@ -11,6 +11,7 @@ #include "packfile.h" #include "object-file.h" #include "odb.h" +#include "odb/source-loose.h" struct alt_base { char *base; diff --git a/http.c b/http.c index d79678d01f0..25b5fc3b3b7 100644 --- a/http.c +++ b/http.c @@ -21,6 +21,7 @@ #include "string-list.h" #include "object-file.h" #include "odb.h" +#include "odb/source-loose.h" #include "tempfile.h" #include "date.h" #include "trace2.h" diff --git a/loose.c b/loose.c index d6a2bb5ba3c..64cd6f1c3c1 100644 --- a/loose.c +++ b/loose.c @@ -4,6 +4,7 @@ #include "object-file.h" #include "odb.h" #include "odb/source-files.h" +#include "odb/source-loose.h" #include "hex.h" #include "repository.h" #include "wrapper.h" diff --git a/object-file.c b/object-file.c index d3ddcbf309c..917a65d5b33 100644 --- a/object-file.c +++ b/object-file.c @@ -20,6 +20,7 @@ #include "object-file-convert.h" #include "object-file.h" #include "odb.h" +#include "odb/source.h" #include "odb/streaming.h" #include "odb/transaction.h" #include "pack.h" diff --git a/object-file.h b/object-file.h index 83d3f38a540..746356ceb51 100644 --- a/object-file.h +++ b/object-file.h @@ -4,7 +4,7 @@ #include "git-zlib.h" #include "object.h" #include "odb.h" -#include "odb/source-loose.h" +#include "odb/streaming.h" #include "odb/transaction.h" /* The maximum size for an object header. */ diff --git a/setup.c b/setup.c index 61bcdafe82a..bc94463a239 100644 --- a/setup.c +++ b/setup.c @@ -9,6 +9,7 @@ #include "hex.h" #include "object-file.h" #include "object-name.h" +#include "odb/source.h" #include "refs.h" #include "repository.h" #include "config.h" -- 2.56.0.500.g5d06dc02cd.dirty