Re: [PATCH v4 06/16] midx: support custom `--base` for incremental MIDX writes
On Tue, May 19, 2026 at 11:57:54AM -0400, Taylor Blau wrote:
Show 33 quoted lines
> diff --git a/t/t5334-incremental-multi-pack-index.sh b/t/t5334-incremental-multi-pack-index.sh
> index 66d6894761b..68a103d13d2 100755
> --- a/t/t5334-incremental-multi-pack-index.sh
> +++ b/t/t5334-incremental-multi-pack-index.sh
> @@ -113,6 +113,36 @@ test_expect_success 'write non-incremental MIDX layer with --no-write-chain-file
> test_grep "cannot use --no-write-chain-file without --incremental" err
> '
>
> +test_expect_success 'write MIDX layer with --base without --no-write-chain-file' '
> + test_must_fail git multi-pack-index write --bitmap --incremental \
> + --base=none 2>err &&
> + test_grep "cannot use --base without --no-write-chain-file" err
> +'
> +
> +test_expect_success 'write MIDX layer with --base=none and --no-write-chain-file' '
> + test_commit base-none &&
> + git repack -d &&
> +
> + cp "$midx_chain" "$midx_chain.bak" &&
> + layer="$(git multi-pack-index write --bitmap --incremental \
> + --no-write-chain-file --base=none)" &&
> +
> + test_cmp "$midx_chain.bak" "$midx_chain" &&
> + test_path_is_file "$midxdir/multi-pack-index-$layer.midx"
> +'
> +
> +test_expect_success 'write MIDX layer with --base=<hash> and --no-write-chain-file' '
> + test_commit base-hash &&
> + git repack -d &&
> +
> + cp "$midx_chain" "$midx_chain.bak" &&
> + layer="$(git multi-pack-index write --bitmap --incremental \
> + --no-write-chain-file --base="$(nth_line 1 "$midx_chain")")" &&
There is no 'nth_line' helper function in this test script.
Show 8 quoted lines
> +
> + test_cmp "$midx_chain.bak" "$midx_chain" &&
> + test_path_is_file "$midxdir/multi-pack-index-$layer.midx"
> +'
> +
> for reuse in false single multi
> do
> test_expect_success "full clone (pack.allowPackReuse=$reuse)" '