3 test_description
='incremental multi-pack-index'
5 TEST_PASSES_SANITIZE_LEAK
=true
7 .
"$TEST_DIRECTORY"/lib-midx.sh
9 GIT_TEST_MULTI_PACK_INDEX
=0
10 export GIT_TEST_MULTI_PACK_INDEX
14 midxdir
=$packdir/multi-pack-index.d
15 midx_chain
=$midxdir/multi-pack-index-chain
17 test_expect_success
'convert non-incremental MIDX to incremental' '
20 git multi-pack-index write &&
22 test_path_is_file $packdir/multi-pack-index &&
23 old_hash="$(midx_checksum $objdir)" &&
27 git multi-pack-index write --incremental &&
29 test_path_is_missing $packdir/multi-pack-index &&
30 test_path_is_file $midx_chain &&
31 test_line_count = 2 $midx_chain &&
32 grep $old_hash $midx_chain
35 compare_results_with_midx
'incremental MIDX'
37 test_expect_success
'convert incremental to non-incremental' '
40 git multi-pack-index write &&
42 test_path_is_file $packdir/multi-pack-index &&
43 test_dir_is_empty $midxdir
46 compare_results_with_midx
'non-incremental MIDX conversion'