Subject: Re: [PATCH 07/17] odb/source: make `reprepare()` function pluggable

From: Justin Tobler <[email-masked]>
Date: Wed, 4 Mar 2026 15:08:16 -0600

On 26/02/23 05:17PM, Patrick Steinhardt wrote:
> Introduce a new callback function in `struct odb_source` to make the
> function pluggable.
> 
> Signed-off-by: Patrick Steinhardt <[email-masked]>
> ---
[snip]
> diff --git a/odb/source.h b/odb/source.h
> index f84da59ef0..2f8132f9e1 100644
> --- a/odb/source.h
> +++ b/odb/source.h
> @@ -58,6 +58,13 @@ struct odb_source {
>  	 * all associated resources. The function will never be called with a NULL pointer.
>  	 */
>  	void (*free)(struct odb_source *source);
> +
> +	/*
> +	 * This callback is expected to clear underlying caches of the object
> +	 * database source. The function is called when the repository has for
> +	 * example just been repacked so that new objects will become visible.
> +	 */
> +	void (*reprepare)(struct odb_source *source);

Naive question: does repreparing a source still make sense outside of
the "files" ODB source? I almost sounds like it should be an internal
detail of the source when reading objects.

-Justin