Subject: Re: [PATCH 06/13] object-file: move loose object cache into loose source

From: Junio C Hamano <[email-masked]>
Date: Fri, 24 Oct 2025 14:44:49 -0700

Patrick Steinhardt <[email-masked]> writes:

> @@ -2006,5 +2006,8 @@ struct odb_loose_source *odb_loose_source_new(struct odb_source *source)
>  
>  void odb_loose_source_free(struct odb_loose_source *source)
>  {
> +	if (!source)
> +		return;
> +	odb_clear_loose_cache(source->source);
>  	free(source);
>  }

This had me confused, especially the source->source part.  Perhaps
call the parameter "loose" so loose->source is the way for somebody
who has a odb_loose_source to learn what odb_source it belongs to,
or something.  Of course the round-about way to clera the cache that
now belongs to odb_loose_source by taking odb_source looked awkward
in this step, but that awkwardness goes away immediately in the next
step.  And the parameter of type "odb_loose_source *" called "source"
here, instead of "loose", still hurts after the next step [07/13] is
applied.