Subject: Re: [PATCH v4 14/14] ref-filter: parse objects on demand

From: Junio C Hamano <[email-masked]>
Date: Tue, 04 Nov 2025 15:40:53 -0800

Jeff King <[email-masked]> 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?