git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] odb: introduce `odb_prepare()`

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 29, 2026, 06:16 UTC
Message-ID
<akIN0CxVxhaHnvJ0@pks.im>
In-Reply-To
<87o6gx4i5w.fsf@emacs.iotcl.com>
On Fri, Jun 26, 2026 at 02:09:47PM +0200, Toon Claes wrote:
Show 22 quoted lines
> Patrick Steinhardt <ps@pks.im> 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
Previous: Toon ClaesNext: Junio C Hamano
Message 8 of 10 in “odb: generalize `reprepare()` callback”
  1. 0/2 odb: generalize `reprepare()` callbackPatrick Steinhardt, Jun 22, 2026
  2. 1/2 odb/source: generalize `reprepare()` callbackPatrick Steinhardt, Jun 22, 2026
  3. Toon ClaesJun 26, 2026
  4. Patrick SteinhardtJun 29, 2026
  5. Toon ClaesJun 30, 2026
  6. 2/2 odb: introduce `odb_prepare()`Patrick Steinhardt, Jun 22, 2026
  7. Toon ClaesJun 26, 2026
  8. Patrick SteinhardtJun 29, 2026
  9. Junio C HamanoJun 29, 2026
  10. Patrick SteinhardtJun 30, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.