diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-07-14 20:46:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-14 20:46:07 +0300 |
commit | 81ebc54e81619ccc71fca6a4ce7822e78b24e80c (patch) | |
tree | cbfb5dcb923201521f89009d764ce3ce8a517d00 /t/lib-gpg.sh | |
parent | aa9166bcc0ba654fc21f198a30647ec087f733ed (diff) | |
parent | 26c9c03f0a9c26f5e41af19f3cbd6f4dda7006b3 (diff) |
Merge branch 'ks/ref-filter-signature'
The "git for-each-ref" family of commands learned placeholders
related to GPG signature verification.
* ks/ref-filter-signature:
ref-filter: add new "signature" atom
t/lib-gpg: introduce new prereq GPG2
Diffstat (limited to 't/lib-gpg.sh')
-rw-r--r-- | t/lib-gpg.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index 739e6ec35c..4eebd9c2b5 100644 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -51,6 +51,27 @@ test_lazy_prereq GPG ' esac ' +test_lazy_prereq GPG2 ' + gpg_version=$(gpg --version 2>&1) + test $? != 127 || exit 1 + + case "$gpg_version" in + "gpg (GnuPG) "[01].*) + say "This test requires a GPG version >= v2.0.0" + exit 1 + ;; + *) + (gpgconf --kill all || : ) && + gpg --homedir "${GNUPGHOME}" --import \ + "$TEST_DIRECTORY"/lib-gpg/keyring.gpg && + gpg --homedir "${GNUPGHOME}" --import-ownertrust \ + "$TEST_DIRECTORY"/lib-gpg/ownertrust && + gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null \ + --sign -u committer@example.com + ;; + esac +' + test_lazy_prereq GPGSM ' test_have_prereq GPG && # Available key info: |