From: Junio C Hamano Date: Tue, 04 Nov 2025 23:40:53 GMT Subject: Re: [PATCH v4 14/14] ref-filter: parse objects on demand Message-ID: In-Reply-To: <20251104220748.GA2638011@coredump.intra.peff.net> Jeff King writes: > On Thu, Oct 23, 2025 at 09:16:23AM +0200, Patrick Steinhardt wrote: > >> -static int get_object(struct ref_array_item *ref, int deref, struct object **obj, >> +static int get_object(struct ref_array_item *ref, int deref, >> struct expand_data *oi, struct strbuf *err) >> { >> - /* parse_object_buffer() will set eaten to 0 if free() will be needed */ >> - int eaten = 1; >> + /* parse_object_buffer() will set eaten to 1 if free() will be needed */ >> + int eaten = 0; > > This comment is surely wrong now, isn't it? It will be set to 1 if > free() is _not_ needed: > >> +out: >> if (!eaten) >> free(oi->content); > > -Peff Wow. Is it just the comment or the updated logic is upside down, too?