From: Justin Tobler Date: Wed, 04 Mar 2026 21:08:16 GMT Subject: Re: [PATCH 07/17] odb/source: make `reprepare()` function pluggable Message-ID: In-Reply-To: <20260223-b4-pks-odb-source-pluggable-v1-7-253bac1db598@pks.im> 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 > --- [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