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

[PATCH 0/2] builtin/repack: avoid rewriting up-to-date MIDX

From
Patrick Steinhardt <ps@pks.im>
Date
Dec 8, 2025, 18:27 UTC
Message-ID
<20251208-pks-skip-noop-rewrite-v1-0-430d52dba9f0@pks.im>
Hi,

this small patch series introduces logic to avoid rewriting the multi-pack index in case it's up-to-date already. This is especially relevant in the context of geometric repacking, where we may decide to not write any new packfiles, but we'd still rewrite the multi-pack index.

This is a follow-up for the discussion that happened at [1].
Thanks!
Patrick
[1]: <20251025191550.GA279793@coredump.intra.peff.net>
---
Patrick Steinhardt (2):
      midx: fix `BUG()` when getting preferred pack without a reverse index
      builtin/repack: don't regenerate MIDX unless needed
 midx.c                      |  2 +-
 pack-revindex.h             |  3 +-
 repack-midx.c               | 90 +++++++++++++++++++++++++++++++++++++++++++++
 t/t5319-multi-pack-index.sh | 55 +++++++++++++++++++++++++++
 t/t7703-repack-geometric.sh | 80 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 228 insertions(+), 2 deletions(-)

--- base-commit: bdc5341ff65278a3cc80b2e8a02a2f02aa1fac06 change-id: 20251208-pks-skip-noop-rewrite-38d7f01c79c5

Next: Patrick Steinhardt
Message 1 of 16 in “builtin/repack: avoid rewriting up-to-date MIDX”
  1. 0/2 builtin/repack: avoid rewriting up-to-date MIDXPatrick Steinhardt, Dec 8, 2025
  2. 1/2 midx: fix `BUG()` when getting preferred pack without a reverse indexPatrick Steinhardt, Dec 8, 2025
  3. Taylor BlauDec 10, 2025
  4. Patrick SteinhardtDec 10, 2025
  5. Taylor BlauDec 18, 2025
  6. 2/2 builtin/repack: don't regenerate MIDX unless neededPatrick Steinhardt, Dec 8, 2025
  7. Taylor BlauDec 10, 2025
  8. Patrick SteinhardtDec 10, 2025
  9. 0/3 builtin/repack: avoid rewriting up-to-date MIDXPatrick Steinhardt, Dec 10, 2025
  10. 1/3 midx: fix `BUG()` when getting preferred pack without a reverse indexPatrick Steinhardt, Dec 10, 2025
  11. 2/3 midx-write: extract function to test whether MIDX needs updatingPatrick Steinhardt, Dec 10, 2025
  12. 3/3 midx-write: skip rewriting MIDX with `--stdin-packs` unless neededPatrick Steinhardt, Dec 10, 2025
  13. Junio C HamanoDec 11, 2025
  14. Patrick SteinhardtDec 12, 2025
  15. Taylor BlauDec 18, 2025
  16. Patrick SteinhardtDec 19, 2025

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.