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

[PATCH 0/3] midx: honor custom bases for incremental writes

From
Taylor Blau <me@ttaylorr.com>
Date
Jun 12, 2026, 20:07 UTC
Message-ID
<cover.1781294771.git.me@ttaylorr.com>

SZEDER noticed[1] that t5334 was trying to call `nth_line()`, despite that helper living only in t5335.

Fixing that should have made the test exercise `git multi-pack-index write --incremental --base=...`. Instead, it uncovered another wrinkle, which is that the normal MIDX write path parsed "--bases" without actually passing it down to the MIDX writer.

This short series fixes both issues. It is structured as follows:
 * The first patch moves `nth_line()` to lib-midx.sh so that t5334 and
   t5335 use the same helper.
 * The second patch threads the parsed `--base` value through
   `write_midx_file()`, and consequently marks two t5334 cases as known
   breakages.
 * The final patch fixes the pack inclusion check and marks the tests
   successful again.

The result is that `--base=none` and `--base=<hash>` now correctly produce detached incremental layers that include any packs above the selected base, preserving reachability closure for bitmaps.

Thanks in advance for your review!
[1]: https://lore.kernel.org/git/aiuaf3fKJ6kIITrf@szeder.dev/
Taylor Blau (3):
  t5334: expose shared `nth_line()` helper
  midx: pass custom '--base' through incremental writes
  midx-write: include packs above custom incremental base
 builtin/multi-pack-index.c              |  3 ++-
 builtin/repack.c                        |  2 +-
 midx-write.c                            | 18 +++++++++++++-----
 midx.h                                  |  2 +-
 t/lib-midx.sh                           |  6 ++++++
 t/t5334-incremental-multi-pack-index.sh | 20 +++++++++++++++++---
 t/t5335-compact-multi-pack-index.sh     |  7 +------
 7 files changed, 41 insertions(+), 17 deletions(-)
base-commit: 3e65291872de10c3f0bf05ea8c24187e7a71ebf0
-- 
2.55.0.rc0.3.g7bf7c87b605
Next: Taylor Blau
Message 1 of 14 in “midx: honor custom bases for incremental writes”
  1. 0/3 midx: honor custom bases for incremental writesTaylor Blau, Jun 12, 2026
  2. 1/3 t5334: expose shared `nth_line()` helperTaylor Blau, Jun 12, 2026
  3. Patrick SteinhardtAug 13, 2026
  4. Taylor BlauAug 13, 2026
  5. 2/3 midx: pass custom '--base' through incremental writesTaylor Blau, Jun 12, 2026
  6. Patrick SteinhardtAug 13, 2026
  7. Taylor BlauAug 13, 2026
  8. Patrick SteinhardtAug 14, 2026
  9. 3/3 midx-write: include packs above custom incremental baseTaylor Blau, Jun 12, 2026
  10. Patrick SteinhardtAug 13, 2026
  11. Taylor BlauAug 13, 2026
  12. Junio C HamanoAug 26, 2026
  13. Taylor BlauAug 26, 2026
  14. Patrick SteinhardtAug 31, 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.