From: Patrick Steinhardt Date: Mon, 29 Jun 2026 06:16:48 GMT Subject: Re: [PATCH 2/2] odb: introduce `odb_prepare()` Message-ID: In-Reply-To: <87o6gx4i5w.fsf@emacs.iotcl.com> On Fri, Jun 26, 2026 at 02:09:47PM +0200, Toon Claes wrote: > Patrick Steinhardt writes: > > diff --git a/odb.h b/odb.h > > index c14c9030e4..b1c0f3767b 100644 > > --- a/odb.h > > +++ b/odb.h > > @@ -133,9 +133,13 @@ enum odb_prepare_flags { > > }; > > > > /* > > - * Clear caches, reload alternates and then reload object sources so that new > > - * objects may become accessible. > > + * Prepare the object database for use. Calling this function is generally not > > + * needed, but can be useful in case the caller wants to pre-open individual > > + * sources. > > */ > > +void odb_prepare(struct object_database *o, enum odb_prepare_flags flags); > > + > > +/* Equivalent to `odb_prepare(o, ODB_PREPARE_FLUSH_CACHES)`. */ > > void odb_reprepare(struct object_database *o); > > According to my grep results are there 17 callsites for odb_reprepare(), > then I agree it makes sense to create this wrapper. Yeah, I was a bit torn myself whether or not to keep the wrapper. I eventually decided to just keep it because it reduces churn, and it's a trivial wrapper anyway. Thanks! Patrick