summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-29 10:35:17 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-29 10:35:17 -0700
commitebc2e5a593ce7082bed03b2d22e2fe83583a9f5d (patch)
tree2455e6eaba3f324d883ee90069019388e80eb16e
parent9db18387056c713eca8f53bff3bb409d23117f1d (diff)
parent21134714787a02a37da15424d72c0119b2b8ed71 (diff)
downloadgit-ebc2e5a593ce7082bed03b2d22e2fe83583a9f5d.tar.gz
Merge branch 'jk/pack-objects-no-bitmap-when-splitting' into maint
* jk/pack-objects-no-bitmap-when-splitting: pack-objects: turn off bitmaps when we split packs
-rw-r--r--builtin/pack-objects.c1
-rwxr-xr-xt/t5310-pack-bitmaps.sh9
2 files changed, 10 insertions, 0 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index b59f5d895e..3eb86e0693 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) {
diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh
index 0580258c91..6003490192 100755
--- a/t/t5310-pack-bitmaps.sh
+++ b/t/t5310-pack-bitmaps.sh
@@ -170,4 +170,13 @@ test_expect_success JGIT 'jgit can read our bitmaps' '
)
'
+test_expect_success 'splitting packs does not generate bogus bitmaps' '
+ test-genrandom foo $((1024 * 1024)) >rand &&
+ git add rand &&
+ git commit -m "commit with big file" &&
+ git -c pack.packSizeLimit=500k repack -adb &&
+ git init --bare no-bitmaps.git &&
+ git -C no-bitmaps.git fetch .. HEAD
+'
+
test_done