git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/2] Add new "signature" atom

From
Kousik Sanagavarapu <five231003@gmail.com>
Date
Jun 2, 2023, 02:11 UTC
Message-ID
<20230602023105.17979-1-five231003@gmail.com>
In-Reply-To
<20230529192209.17747-1-five231003@gmail.com>
Hi,
Thanks for the review.
Changes since v1:
    PATCH 1/2 -
	Changed the condition so that prereq GPG2 will only fail
	if we have GPG v0.* or v1.* instead of failing when we
	don't have v2.* (this will have an effect if in the future
	GPG v3.*, v4.* were introduced).
    PATCH 2/2 -
	Renamed the setup tests to be more clear about their purpose.
    Common to both the patches is the change where we introduce a
    newline to a file. Use "echo >" instead of "echo "" >".

I have also rebased this to be on top of v2.41.0, the previous version was on top of v2.41.0-rc0.

Range-diff against v1:
1:  5c97d11b79 ! 1:  87465ef1a8 t/lib-gpg: introduce new prereq GPG2
    @@ t/lib-gpg.sh: test_lazy_prereq GPG '
     +  test $? != 127 || exit 1
     +
     +  case "$gpg_version" in
    -+  !"gpg (GnuPG) 2."*)
    ++  "gpg (GnuPG) 0."* | "gpg (GnuPG) 1.*")
     +          say "This test requires a GPG version >= v2.0.0"
     +          exit 1
     +          ;;
    @@ t/t7510-signed-commit.sh: test_expect_success GPG 'amending
already signed commi
      
     +test_expect_success GPG2 'bare signature' '
     +  git verify-commit fifth-signed 2>expect &&
    -+  echo "" >>expect &&
    ++  echo >>expect &&
     +  git log -1 --format="%GG" fifth-signed >actual &&
     +  test_cmp expect actual
     +'
2:  e89f14283d ! 2:  690869aa47 ref-filter: add new "signature" atom
    @@ t/t6300-for-each-ref.sh: test_expect_success 'git for-each-ref
with non-existing
     +GRADE_FORMAT="%(signature:grade)%0a%(signature:key)%0a%(signature:signer)%0a%(signature:fingerprint)%0a%(signature:primarykeyfingerprint)"
     +TRUSTLEVEL_FORMAT="%(signature:trustlevel)%0a%(signature:key)%0a%(signature:signer)%0a%(signature:fingerprint)%0a%(signature:primarykeyfingerprint)"
     +
    -+test_expect_success GPG 'setup: signature gpg' '
    ++test_expect_success GPG 'setup for signature atom using gpg' '
     +  git checkout -b signed &&
     +
     +  test_when_finished "test_unconfig commit.gpgSign" &&
    @@ t/t6300-for-each-ref.sh: test_expect_success 'git for-each-ref
with non-existing
     +  git tag seventh-unsigned
     +'
     +
    -+test_expect_success GPGSSH 'setup: signature ssh' '
    ++test_expect_success GPGSSH 'setup for signature atom using ssh' '
    ++  test_when_finished "test_unconfig gpg.format user.signingkey" &&
    ++
     +  test_config gpg.format ssh &&
     +  test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&
     +  echo "8" >file &&
    @@ t/t6300-for-each-ref.sh: test_expect_success 'git for-each-ref
with non-existing
     +  grep -Ev "checking the trustdb|PGP trust model" out.raw >out &&
     +  head -3 out >expect &&
     +  tail -1 out >>expect &&
    -+  echo "" >>expect &&
    ++  echo  >>expect &&
     +  git for-each-ref refs/tags/first-signed \
     +          --format="%(signature)" >actual &&
     +  test_cmp expect actual
Kousik Sanagavarapu (2):
  t/lib-gpg: introduce new prereq GPG2
  ref-filter: add new "signature" atom
 Documentation/git-for-each-ref.txt |  27 ++++
 ref-filter.c                       | 111 ++++++++++++++++-
 t/lib-gpg.sh                       |  21 ++++
 t/t6300-for-each-ref.sh            | 191 +++++++++++++++++++++++++++++
 t/t7510-signed-commit.sh           |   7 ++
 5 files changed, 355 insertions(+), 2 deletions(-)
-- 
2.41.0
Previous: Christian CouderNext: Kousik Sanagavarapu
Message 7 of 19 in “Add new "signature" atom”
  1. Kousik SanagavarapuMay 29, 2023
  2. 1/2 t/lib-gpg: introduce new prereq GPG2Kousik Sanagavarapu, May 29, 2023
  3. Christian CouderJun 1, 2023
  4. 2/2 ref-filter: add new "signature" atomKousik Sanagavarapu, May 29, 2023
  5. Christian CouderJun 1, 2023
  6. Christian CouderJun 1, 2023
  7. 0/2 Add new "signature" atomKousik Sanagavarapu, Jun 2, 2023
  8. 1/2 t/lib-gpg: introduce new prereq GPG2Kousik Sanagavarapu, Jun 2, 2023
  9. Christian CouderJun 2, 2023
  10. Kousik SanagavarapuJun 2, 2023
  11. 2/2 ref-filter: add new "signature" atomKousik Sanagavarapu, Jun 2, 2023
  12. Oswald BuddenhagenJun 2, 2023
  13. Junio C HamanoJun 2, 2023
  14. Eric SunshineJun 2, 2023
  15. Junio C HamanoJun 3, 2023
  16. Kousik SanagavarapuJun 2, 2023
  17. 0/2 Add new "signature" atomKousik Sanagavarapu, Jun 4, 2023
  18. 1/2 t/lib-gpg: introduce new prereq GPG2Kousik Sanagavarapu, Jun 4, 2023
  19. 2/2 ref-filter: add new "signature" atomKousik Sanagavarapu, Jun 4, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.