Re: [PATCH v3 18/25] t5326: test multi-pack bitmap behavior
From: Jeff King <hidden>
Date: 2021-08-12 23:23:24
On Thu, Aug 12, 2021 at 06:38:20PM -0400, Taylor Blau wrote:
quoted
This is brittle with respect to Git's delta heuristics, of course, but I don't think there's a better way to do it with pack-objects. And this is not the first test to make similar assumptions. I think you can construct a known set of deltas using lib-pack.sh. It may get a bit complicated. As an alternative, maybe it makes sense to confirm that the deltas are set up as expected? You can do it with cat-file --batch-check.Yeah, I definitely agree that this test is brittle. But it would fail if our assumptions about what gets delta'd with what changes, because we do check that 'a' is a delta on top of 'b' (see the call to have_delta towards the end of this test). That have_delta helper does use `--batch-check=%(deltabase)`, which is (I think) the cat-file invocation you're mentioning.
Doh, I totally missed that. I was expecting to verify it earlier in the test as a pre-condition, but it works just fine where it is. So yeah, you are already doing the thing I was suggesting. -Peff