On Fri, Jun 28 2019, Jeff King wrote: > On Fri, Jun 28, 2019 at 02:41:03AM -0400, Jeff King wrote: > >> I think this would exercise it, at the cost of making the test more >> expensive: >> >> diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh >> index 82d7f7f6a5..8ed6982dcb 100755 >> --- a/t/t5310-pack-bitmaps.sh >> +++ b/t/t5310-pack-bitmaps.sh >> @@ -21,7 +21,7 @@ has_any () { >> } >> >> test_expect_success 'setup repo with moderate-sized history' ' >> - for i in $(test_seq 1 10) >> + for i in $(test_seq 1 100) >> do >> test_commit $i >> done && >> >> It would be nice if we had a "test_commits_bulk" that used fast-import >> to create larger numbers of commits. > > So here's a patch to do that. Writing the bulk commit function was a fun > exercise, and I found a couple other places to apply it, too, shaving > off ~7.5 seconds from my test runs. Not ground-breaking, but I think > it's nice to have a solution where we don't have to be afraid to > generate a bunch of commits. Nice. Just a side-note: I've wondered how much we could speed up the tests in other places if rather than doing setup all over the place we simply created a few "template" repository shapes, and the common case for tests would be to simply cp(1) those over. I.e. for things like fsck etc. we really do need some specific repository layout, but a lot of our tests are simply re-doing setup slightly differently just to get things like "I want a few commits on a few branches" or "set up a repo like <that> but with some remotes" etc.