From 21134714787a02a37da15424d72c0119b2b8ed71 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 16 Oct 2014 21:11:43 -0400 Subject: pack-objects: turn off bitmaps when we split packs If a pack.packSizeLimit is set, we may split the pack data across multiple packfiles. This means we cannot generate .bitmap files, as they require that all of the reachable objects are in the same pack. We check that condition when we are generating the list of objects to pack (and disable bitmaps if we are not packing everything), but we forgot to update it when we notice that we needed to split (which doesn't happen until the actual write phase). The resulting bitmaps are quite bogus (they mention entries that do not exist in the pack!) and can cause a fetch or push to send insufficient objects. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin/pack-objects.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin') diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index de36c60ca1..a6c91fa002 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -812,6 +812,7 @@ static void write_pack_file(void) fixup_pack_header_footer(fd, sha1, pack_tmp_name, nr_written, sha1, offset); close(fd); + write_bitmap_index = 0; } if (!pack_to_stdout) { -- cgit v1.2.3