From: Junio C Hamano Date: Mon, 27 Jul 2015 19:21:42 +0000 (-0700) Subject: Merge branch 'jk/rev-list-no-bitmap-while-pruning' into maint X-Git-Tag: v2.4.7~10 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/726359be47b194c692990d3047d23ac56142a220?ds=inline;hp=-c Merge branch 'jk/rev-list-no-bitmap-while-pruning' into maint A minor bugfix when pack bitmap is used with "rev-list --count". * jk/rev-list-no-bitmap-while-pruning: rev-list: disable --use-bitmap-index when pruning commits --- 726359be47b194c692990d3047d23ac56142a220 diff --combined t/t5310-pack-bitmaps.sh index 6003490192,bbb7623e70..d446706e94 --- a/t/t5310-pack-bitmaps.sh +++ b/t/t5310-pack-bitmaps.sh @@@ -18,7 -18,7 +18,7 @@@ test_expect_success 'setup repo with mo 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 +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 tmp2 && @@@ -170,13 -176,4 +176,13 @@@ test_expect_success JGIT 'jgit can rea ) ' +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