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

[PATCH 0/2] odb: generalize `reprepare()` callback

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 22, 2026, 08:47 UTC
Message-ID
<20260622-b4-pks-odb-generalize-prepare-v1-0-d2a5c5d13144@pks.im>
Hi,

this small patch series generalizes the `reprepare()` callback into a `prepare()` callback that accepts an optional flag to also discard any caches. This is required so that we can make git-grep(1) become fully generic.

The series is built on top of 8d96f09e92 (Merge branch 'js/objects-larger-than-4gb-on-windows', 2026-06-19) with ps/odb-source-packed at 1bba3c035d (odb/source-packed: drop pointer to "files" parent source, 2026-06-17) merged into it.

Thanks!
Patrick
---
Patrick Steinhardt (2):
      odb/source: generalize `reprepare()` callback
      odb: introduce `odb_prepare()`
 builtin/grep.c        | 14 +++-----------
 midx.c                |  2 +-
 odb.c                 | 18 ++++++++++++------
 odb.h                 | 16 ++++++++++++++--
 odb/source-files.c    |  9 +++++----
 odb/source-inmemory.c |  5 +++--
 odb/source-loose.c    |  8 +++++---
 odb/source-packed.c   | 34 ++++++++++++++++------------------
 odb/source-packed.h   |  9 ---------
 odb/source.h          | 16 +++++++++-------
 packfile.c            |  2 +-
 11 files changed, 69 insertions(+), 64 deletions(-)

--- base-commit: 4a8e7a446f41435e157131162dfe901eca9250fe change-id: 20260612-b4-pks-odb-generalize-prepare-509ffc18f502

Next: Patrick Steinhardt
Message 1 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.