From: Patrick Steinhardt Date: Fri, 21 Nov 2025 06:32:37 GMT Subject: Re: [PATCH 03/18] streaming: propagate final object type via the stream Message-ID: In-Reply-To: On Wed, Nov 19, 2025 at 01:25:29PM -0600, Justin Tobler wrote: > On 25/11/19 08:47AM, Patrick Steinhardt wrote: > > diff --git a/streaming.c b/streaming.c > > index 5ce6350123..9596a94c58 100644 > > --- a/streaming.c > > +++ b/streaming.c > > @@ -496,6 +495,7 @@ struct odb_read_stream *open_istream(struct repository *r, > > } > > > > *size = st->size; > > + *type = st->type; > > So even though `open_istream()` returns `odb_read_stream` which contains > the object type, this function still accepts an object type pointer. At > first I thought this was a bit strange, but `odb_read_stream` is an > opaque structure so this make sense and is also what we do for object > size. Yeah. I was a bit torn here to be honest, but ultimately decided against dropping the type pointer. At the end of this series we _can_ do this in theory as the `struct odb_read_stream` becomes public. I'll add another patch to do this conversion at the end of this series. Patrick