Re: [PATCH 2/2] ref-filter: add new "signature" atom
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 1, 2023, 08:58 UTC
- Message-ID
- <CAP8UFD0zQoc9zgMLdxNavMmPyjk5Orp1PDx5gpDEyuv5sv7h8w@mail.gmail.com>
- In-Reply-To
- <20230529192209.17747-3-five231003@gmail.com>
On Mon, May 29, 2023 at 9:23 PM Kousik Sanagavarapu <five231003@gmail.com> wrote:
> +test_expect_success GPG 'setup: signature gpg' '
Maybe something like "setup: sign some commits using gpg" or "setup for signature atom using gpg" would be a bit clearer.
> +test_expect_success GPGSSH 'setup: signature ssh' '
Here also something like "setup: sign some commits using ssh" or "setup for signature atom using ssh" would be a bit clearer.
> + test_config gpg.format ssh &&
> + test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&I wonder if this test should try to clean up the config a bit after itself. The previous test used:
`test_when_finished "test_unconfig commit.gpgSign"`
and maybe this one could do something similar.
Show 12 quoted lines
> + echo "8" >file && > + test_tick && > + git commit -a -S -m "file: 8" && > + git tag eighth-signed-ssh > +' > + > +test_expect_success GPG2 'bare signature atom' ' > + git verify-commit first-signed 2>out.raw && > + grep -Ev "checking the trustdb|PGP trust model" out.raw >out && > + head -3 out >expect && > + tail -1 out >>expect && > + echo "" >>expect &&
`echo >>expect` is more common to add a new line.
> + git for-each-ref refs/tags/first-signed \ > + --format="%(signature)" >actual && > + test_cmp expect actual > +'