On Mon, Jul 12, 2021 at 3:17 PM Christian Couder <christian.couder@xxxxxxxxx> wrote: > > On Mon, Jul 12, 2021 at 1:47 PM ZheNing Hu via GitGitGadget > <gitgitgadget@xxxxxxxxx> wrote: > > +batch_test_atom() { > > + if test "$3" = "fail" > > + then > > + test_expect_${4:-success} $PREREQ "basic atom: $1 $2 must fail" " > > + test_must_fail git cat-file --batch-check='$2' >bad <<-EOF > > + $1 > > + EOF > > + " > > + else > > + test_expect_${4:-success} $PREREQ "basic atom: $1 $2" " > > + git for-each-ref --format='$2' $1 >expected && > > + git cat-file --batch-check='$2' >actual <<-EOF && > > + $1 > > + EOF > > + sanitize_pgp <actual >actual.clean && > > + cmp expected actual.clean > > + " > > + fi > > +} > > I wonder if the above function and some of the tests below could be > introduced in a preparatory patch before this one. It could help check > that reusing ref-filter doesn't change the behavior with some atoms > that were previously supported or rejected. Of course if some atoms > are now failing or are now supported, then it's ok to add new tests > for these atoms in this patch. For example maybe some of the tests could be introduced earlier when the reject_atom() function is introduced.