Skip to content

midx: honor custom bases for incremental writes

Taylor Blau git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3t5334: expose shared `nth_line()` helpert/lib-midx.sh t/t5335-compact-multi-pack-index.sh+7 -62 replies
2/3midx: pass custom '--base' through incremental writesbuiltin/multi-pack-index.c builtin/repack.c midx-write.c +2 more+25 -83 replies
3/3midx-write: include packs above custom incremental basemidx-write.c t/t5334-incremental-multi-pack-index.sh+13 -75 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchSZEDER Gábor
1/3Noticed-by
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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/[email protected]/

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

Signature · 1 line
2.55.0.rc0.3.g7bf7c87b605