summaryrefslogtreecommitdiff
path: root/t/t5310-pack-bitmaps.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5310-pack-bitmaps.sh')
-rwxr-xr-xt/t5310-pack-bitmaps.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh
index f4f02ba..d446706 100755
--- a/t/t5310-pack-bitmaps.sh
+++ b/t/t5310-pack-bitmaps.sh
@@ -18,7 +18,7 @@ test_expect_success 'setup repo with moderate-sized history' '
git checkout master &&
blob=$(echo tagged-blob | git hash-object -w --stdin) &&
git tag tagged-blob $blob &&
- git config pack.writebitmaps true &&
+ git config repack.writebitmaps true &&
git config pack.writebitmaphashcache true
'
@@ -53,6 +53,12 @@ rev_list_tests() {
test_cmp expect actual
'
+ test_expect_success "counting commits with limiting ($state)" '
+ git rev-list --count HEAD -- 1.t >expect &&
+ git rev-list --use-bitmap-index --count HEAD -- 1.t >actual &&
+ test_cmp expect actual
+ '
+
test_expect_success "enumerate --objects ($state)" '
git rev-list --objects --use-bitmap-index HEAD >tmp &&
cut -d" " -f1 <tmp >tmp2 &&
@@ -170,4 +176,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