Re: [PATCH 03/18] streaming: propagate final object type via the stream
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Nov 21, 2025, 06:32 UTC
- Message-ID
- <aSAHhUGzG-c2o98d@pks.im>
- In-Reply-To
- <cuvoz5gl7d6xgj757jgb26kj3qeunc4w3pg72it53zi6rs5lka@2nc5x4b2e3eg>
On Wed, Nov 19, 2025 at 01:25:29PM -0600, Justin Tobler wrote:
Show 16 quoted lines
> 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