On Tue, Feb 18, 2020 at 01:05:35PM -0500, Derrick Stolee wrote: > On 2/14/2020 1:22 PM, Jeff King wrote: > > +test_expect_success 'rev-list --count' ' > > + count=$(git rev-list --count HEAD) && > > + git rev-list HEAD >actual && > > + test_line_count = $count actual > > +' > > + > > +test_expect_success 'rev-list --count --objects' ' > > + count=$(git rev-list --count --objects HEAD) && > > + git rev-list --objects HEAD >actual && > > + test_line_count = $count actual > > +' > > I suppose these tests work, although I would probably > prefer precomputed explicit expected counts instead > of asking rev-list for the correct answer to a > rev-list command. This is still fine, because we test > that the non-count versions return the correct results, > but I would hate for a bug to affect both modes equally > and cause these tests to pass. I was hoping it would make the tests a bit less brittle. And as you note, we should be checking the enumeration results themselves more carefully in other tests, so I find it fairly unlikely to see a bug that doesn't trigger _any_ test failure. -Peff