All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Kousik Sanagavarapu <five231003@gmail.com>
Cc: git@vger.kernel.org, Hariom Verma <hariom18599@gmail.com>
Subject: Re: [PATCH 1/2] t/lib-gpg: introduce new prereq GPG2
Date: Thu, 1 Jun 2023 10:39:16 +0200	[thread overview]
Message-ID: <CAP8UFD1FkUJ0t0OosendGBQWZJC6AbntN4r7GmaVNVKHwHEc=w@mail.gmail.com> (raw)
In-Reply-To: <20230529192209.17747-2-five231003@gmail.com>

On Mon, May 29, 2023 at 9:23 PM Kousik Sanagavarapu
<five231003@gmail.com> wrote:
>
> GnuPG v2.0.0 released in 2006, which according to its release notes
>
>         https://gnupg.org/download/release_notes.html
>
> is the "First stable version of GnuPG integrating OpenPGP and S/MIME".
>
> Use this version or it's successors for tests that will fail for
> versions less than v2.0.0 because of the difference in the output on
> stderr between the versions (v2.* vs v0.* or v2.* vs v1.*). Skip if
> the GPG version detected is less than v2.0.0.

Yeah, I think it's reasonable to stop worrying about the output of GPG
versions that are 17 year old.

> +test_lazy_prereq GPG2 '
> +       gpg_version=$(gpg --version 2>&1)
> +       test $? != 127 || exit 1
> +
> +       case "$gpg_version" in
> +       !"gpg (GnuPG) 2."*)

Maybe something like `"gpg (GnuPG) 0."* | "gpg (GnuPG) 1."*)` would be
better, as it would allow versions 3.X, 4.X, etc if they are ever
released.

> +               say "This test requires a GPG version >= v2.0.0"
> +               exit 1
> +               ;;

> diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
> index ccbc416402..96b316ae01 100755
> --- a/t/t7510-signed-commit.sh
> +++ b/t/t7510-signed-commit.sh
> @@ -218,6 +218,13 @@ test_expect_success GPG 'amending already signed commit' '
>         ! grep "BAD signature from" actual
>  '
>
> +test_expect_success GPG2 'bare signature' '
> +       git verify-commit fifth-signed 2>expect &&
> +       echo "" >>expect &&

We sometimes use `echo "" >` to add a new line, but we much more often
use just `echo >` for that purpose:

$ git grep 'echo >' | wc -l
339
$ git grep 'echo "" >' | wc -l
16

> +       git log -1 --format="%GG" fifth-signed >actual &&
> +       test_cmp expect actual
> +'

Thanks!

  reply	other threads:[~2023-06-01  8:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 18:32 [GSoC][PATCH 0/2] Add new "signature" atom Kousik Sanagavarapu
2023-05-29 18:32 ` [PATCH 1/2] t/lib-gpg: introduce new prereq GPG2 Kousik Sanagavarapu
2023-06-01  8:39   ` Christian Couder [this message]
2023-05-29 18:32 ` [PATCH 2/2] ref-filter: add new "signature" atom Kousik Sanagavarapu
2023-06-01  8:58   ` Christian Couder
2023-06-01  9:11 ` [GSoC][PATCH 0/2] Add " Christian Couder
2023-06-02  2:11 ` [PATCH v2 " Kousik Sanagavarapu
2023-06-02  2:11   ` [PATCH v2 1/2] t/lib-gpg: introduce new prereq GPG2 Kousik Sanagavarapu
2023-06-02  6:50     ` Christian Couder
2023-06-02 12:58       ` Kousik Sanagavarapu
2023-06-02  2:11   ` [PATCH v2 2/2] ref-filter: add new "signature" atom Kousik Sanagavarapu
2023-06-02  8:23     ` Oswald Buddenhagen
2023-06-02  7:29   ` [PATCH v2 0/2] Add " Junio C Hamano
2023-06-02  7:51     ` Eric Sunshine
2023-06-03  0:16       ` Junio C Hamano
2023-06-02 13:13     ` Kousik Sanagavarapu
2023-06-04 18:22   ` [PATCH v3 " Kousik Sanagavarapu
2023-06-04 18:22     ` [PATCH v3 1/2] t/lib-gpg: introduce new prereq GPG2 Kousik Sanagavarapu
2023-06-04 18:22     ` [PATCH v3 2/2] ref-filter: add new "signature" atom Kousik Sanagavarapu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP8UFD1FkUJ0t0OosendGBQWZJC6AbntN4r7GmaVNVKHwHEc=w@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=five231003@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hariom18599@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.