From: Jeff King <peff@peff.net>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: git tag -v should verify that the tag signer intended the same tag name as the user is verifying
Date: Tue, 26 Mar 2019 14:40:01 -0400 [thread overview]
Message-ID: <20190326184001.GD24105@sigill.intra.peff.net> (raw)
In-Reply-To: <87ftr9h72a.fsf@fifthhorseman.net>
On Tue, Mar 26, 2019 at 06:35:57PM +0100, Daniel Kahn Gillmor wrote:
> But I don't see how to use --format with "git tag -v" at all. Can you
> show me what i'm doing wrong? git-tag(1) says that --format defaults to
> '%(refname:strip=2)', but git tag -v behaves differently when i specify
> that same default explicitly:
Hmm.
I think the documentation is unclear. For a normal listing of tags,
the default format is the stripped refname, and you can override it with
--format.
For "-v", the default is to dump the whole tag contents (i.e.,
traditionally it just ran "verify-tag -v" under the hood, though I think
it is all done internally now).
So this doesn't surprise me:
> 0 dkg@alice:~/src/pkg-gnupg/gnupg2$ git tag -v gnupg-2.2.13
> object 7922e2dd1c7eee48a8a2cf4799827942489ddd0f
> type commit
> tag gnupg-2.2.13
> tagger Werner Koch <wk@gnupg.org> 1549985965 +0100
>
> You may want to watch the Ellsberg/Chomsky discussion
> at <https://riseuptimes.org/2018/04/25/daniel-ellsberg-and-noam-chomsky-discuss-nuclear-war/>
> or at <https://theintercept.com/chomsky-ellsberg/>
> gpg: Signature made Tue 12 Feb 2019 04:41:32 PM CET
> gpg: using RSA key D8692123C4065DEA5E0F3AB5249B39D24F25E3B6
> gpg: Good signature from "Werner Koch (dist sig)" [full]
> Primary key fingerprint: D869 2123 C406 5DEA 5E0F 3AB5 249B 39D2 4F25 E3B6
But this does:
> 0 dkg@alice:~/src/pkg-gnupg/gnupg2$ git tag -v --format='%(refname:strip=2)' gnupg-2.2.13
I'd expect it to print the tagname here. It looks like we only feed the
partial tagname to the ref-formatting machinery, so the "strip" doesn't
do what you'd expect.
It also doesn't show the gpg output, though it does actually verify the
tag. But AFAIK there's no format specifier in the ref-filter language
for showing the GPG output! What a mess.
-Peff
prev parent reply other threads:[~2019-03-26 18:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 12:24 git tag -v should verify that the tag signer intended the same tag name as the user is verifying Daniel Kahn Gillmor
2019-03-20 14:20 ` Santiago Torres Arias
2019-03-20 22:00 ` Daniel Kahn Gillmor
2019-03-20 22:35 ` Ævar Arnfjörð Bjarmason
2019-03-22 4:00 ` Daniel Kahn Gillmor
2019-03-24 14:55 ` Ævar Arnfjörð Bjarmason
2019-03-21 1:21 ` Junio C Hamano
2019-03-21 1:31 ` Junio C Hamano
2019-03-21 11:43 ` Ævar Arnfjörð Bjarmason
2019-03-22 5:19 ` Daniel Kahn Gillmor
2019-03-24 12:26 ` Junio C Hamano
2019-03-24 15:07 ` Daniel Kahn Gillmor
2019-03-25 2:27 ` Junio C Hamano
2019-03-26 17:35 ` Daniel Kahn Gillmor
2019-03-26 18:40 ` Jeff King [this message]
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=20190326184001.GD24105@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=dkg@fifthhorseman.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).