diff options
author | Derrick Stolee <stolee@gmail.com> | 2018-07-12 21:39:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-20 20:27:29 +0200 |
commit | 525e18c04bb38450e6677bb2aa5c65b78254b5c2 (patch) | |
tree | 4ecc21ed7cc9200580b1e20344681c5ef9420433 /t/t5319-multi-pack-index.sh | |
parent | packfile: skip loading index if in multi-pack-index (diff) | |
download | git-525e18c04bb38450e6677bb2aa5c65b78254b5c2.tar.xz git-525e18c04bb38450e6677bb2aa5c65b78254b5c2.zip |
midx: clear midx on repack
If a 'git repack' command replaces existing packfiles, then we must
clear the existing multi-pack-index before moving the packfiles it
references.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5319-multi-pack-index.sh')
-rwxr-xr-x | t/t5319-multi-pack-index.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index b9661c7c66..ae1d5d4592 100755 --- a/t/t5319-multi-pack-index.sh +++ b/t/t5319-multi-pack-index.sh @@ -141,6 +141,15 @@ test_expect_success 'write midx with twelve packs' ' compare_results_with_midx "twelve packs" +test_expect_success 'repack removes multi-pack-index' ' + test_path_is_file $objdir/pack/multi-pack-index && + git repack -adf && + test_path_is_missing $objdir/pack/multi-pack-index +' + +compare_results_with_midx "after repack" + + # usage: corrupt_data <file> <pos> [<data>] corrupt_data () { file=$1 |