From: Karthik Nayak Date: Thu, 05 Mar 2026 11:13:24 GMT Subject: Re: [PATCH 10/17] odb/source: make `read_object_stream()` function pluggable Message-ID: In-Reply-To: <20260223-b4-pks-odb-source-pluggable-v1-10-253bac1db598@pks.im> Patrick Steinhardt writes: > Introduce a new callback function in `struct odb_source` to make the > function pluggable. > > Signed-off-by: Patrick Steinhardt > --- > odb/source-files.c | 12 ++++++++++++ > odb/source.h | 23 +++++++++++++++++++++++ > odb/streaming.c | 9 ++------- > 3 files changed, 37 insertions(+), 7 deletions(-) > > diff --git a/odb/source-files.c b/odb/source-files.c > index f2969a1214..b50a1f5492 100644 > --- a/odb/source-files.c > +++ b/odb/source-files.c > @@ -55,6 +55,17 @@ static int odb_source_files_read_object_info(struct odb_source *source, > return -1; > } > > +static int odb_source_files_read_object_stream(struct odb_read_stream **out, > + struct odb_source *source, > + const struct object_id *oid) > +{ > + struct odb_source_files *files = odb_source_files_downcast(source); > + if (!packfile_store_read_object_stream(out, files->packed, oid) || > + !odb_source_loose_read_object_stream(out, source, oid)) > + return 0; > + return -1; Same issue here regarding loss of error code propagation. [snip] The patch looks good otherwise.