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

From: Jeff King <[email-masked]>
Date: Tue, 4 Nov 2025 17:07:48 -0500

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