Jeff King wrote: > On Mon, May 31, 2021 at 11:07:26AM -0500, Felipe Contreras wrote: > > > Jeff King wrote: > > > The simplest test is just: > > > > > > git -C all-two cat-file --batch-all-objects --batch="%(objectname)" >/dev/null > > > > > > which will currently fail. It would be nice to verify that its output is > > > sensible, but I'm not sure how to easily do that (it will spew a bunch > > > of binary tree data, and it cannot even be parsed reliably since we > > > haven't output the sizes). > > > > I use ruby to parse binary data from git all the time: > > > > git log --format='%b%x00' | > > ruby -e 'ARGF.each("\0", chomp: true) { |chunk| p chunk }' > > I doubt we'd want to add a ruby dependency to our test suite, but sure, > we could do the same thing with perl. I don't mean in the final patches, I mean while the patches are being developed. Once it's clear what the code should do, and how to verify it's doing what it's supposed to be doing, we can decide how the test suite should verify it. Ruby is great for prototyping. -- Felipe Contreras