diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-10-28 21:26:54 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-28 21:26:54 +0300 |
commit | c5dd7773e138d4b41074d4c6a193651cc187ec1d (patch) | |
tree | ab57c07089c9df58e6864161d5528148fb32c68b /t/t7700-repack.sh | |
parent | 7b9b634ca5e931941938c93bd233d9c6848fd7b2 (diff) | |
parent | 55d902cd61a8fd2e9b9aa4bf49b47e4dbf10ea67 (diff) |
Merge branch 'tb/remove-unused-pack-bitmap'
When creating a multi-pack bitmap, remove per-pack bitmap files
unconditionally as they will never be consulted.
* tb/remove-unused-pack-bitmap:
builtin/repack.c: remove redundant pack-based bitmaps
Diffstat (limited to 't/t7700-repack.sh')
-rwxr-xr-x | t/t7700-repack.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh index df8e94d7a8..10e4e9663b 100755 --- a/t/t7700-repack.sh +++ b/t/t7700-repack.sh @@ -426,6 +426,27 @@ test_expect_success '--write-midx -b packs non-kept objects' ' ) ' +test_expect_success '--write-midx removes stale pack-based bitmaps' ' + rm -fr repo && + git init repo && + test_when_finished "rm -fr repo" && + ( + cd repo && + test_commit base && + GIT_TEST_MULTI_PACK_INDEX=0 git repack -Ab && + + pack_bitmap=$(ls $objdir/pack/pack-*.bitmap) && + test_path_is_file "$pack_bitmap" && + + test_commit tip && + GIT_TEST_MULTI_PACK_INDEX=0 git repack -bm && + + test_path_is_file $midx && + test_path_is_file $midx-$(midx_checksum $objdir).bitmap && + test_path_is_missing $pack_bitmap + ) +' + test_expect_success '--write-midx with --pack-kept-objects' ' git init repo && test_when_finished "rm -fr repo" && |