Skip to content

Commit 26a22d8

Browse files
committed
Merge branch 'jk/pack-objects-no-bitmap-when-splitting'
Splitting pack-objects output into multiple packs is incompatible with the use of reachability bitmap. * jk/pack-objects-no-bitmap-when-splitting: pack-objects: turn off bitmaps when we split packs
2 parents 19b5d50 + 2113471 commit 26a22d8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

builtin/pack-objects.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ static void write_pack_file(void)
811811
fixup_pack_header_footer(fd, sha1, pack_tmp_name,
812812
nr_written, sha1, offset);
813813
close(fd);
814+
write_bitmap_index = 0;
814815
}
815816

816817
if (!pack_to_stdout) {

t/t5310-pack-bitmaps.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,13 @@ test_expect_success JGIT 'jgit can read our bitmaps' '
170170
)
171171
'
172172

173+
test_expect_success 'splitting packs does not generate bogus bitmaps' '
174+
test-genrandom foo $((1024 * 1024)) >rand &&
175+
git add rand &&
176+
git commit -m "commit with big file" &&
177+
git -c pack.packSizeLimit=500k repack -adb &&
178+
git init --bare no-bitmaps.git &&
179+
git -C no-bitmaps.git fetch .. HEAD
180+
'
181+
173182
test_done

0 commit comments

Comments
 (0)