git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Santiago Torres Arias <santiago@nyu.edu>,
	git@vger.kernel.org, gitster@pobox.com, sunshine@sunshineco.us
Subject: Re: [RFC PATCH] builtin:tag:verify_tag: allow gpg output + pretty
Date: Mon, 22 Apr 2019 22:13:12 -0400	[thread overview]
Message-ID: <20190423021312.GC16369@sigill.intra.peff.net> (raw)
In-Reply-To: <20190422230701.GD6316@genre.crustytoothpaste.net>

On Mon, Apr 22, 2019 at 11:07:01PM +0000, brian m. carlson wrote:

> On Mon, Apr 22, 2019 at 12:02:11PM -0400, Jeff King wrote:
> > On Mon, Apr 22, 2019 at 11:46:56AM -0400, Santiago Torres Arias wrote:
> > 
> > > > In some ways I'm less concerned about verify-tag, though, because the
> > > > point is that it should be scriptable. And scraping gpg's stderr is not
> > > > ideal there. We should be parsing --status-fd ourselves and making the
> > > > result available via format specifier, similar to the way "log
> > > > --format=%G?" works.
> > > 
> > > I think that would be great, as we could make it simpler for verifiers
> > > to parse gpg output.
> > 
> > Alternatively, we could make it an option to dump the --status-fd output
> > to stderr (or to a custom fd). That still leaves the caller with the
> > responsibility to parse gpg's output, but at least they're parsing the
> > machine-readable bits and not the regular human-readable stderr.
> 
> Don't we already have that for verify-tag and verify-commit? I recall
> adding "--raw" for that very reason:

Heh. Today I learned about "--raw". :)

Thanks for pointing it out. I do still think it would be nice for some
cases to have --format specifiers to get the basic info, but I am glad
that we already have a reasonable method that scripts can use.

It might make sense to make it available from the git-tag porcelain,
too, but since the point is scripting, I'm not sure it's all that
important.

It looks like using "--format" suppresses it, too, which we'd probably
want to fix (presumably it's the same as the fix for the non-raw
output).

> The idea was that users might want to restrict signatures to using
> subkeys or certain algorithms or what-have-you, and this was the easiest
> way to let people have all of that power.

Yeah, that makes perfect sense.

-Peff

      parent reply	other threads:[~2019-04-23  2:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 20:14 [RFC PATCH] builtin:tag:verify_tag: allow gpg output + pretty santiago
2019-04-12 20:16 ` Santiago Torres Arias
2019-04-22 15:27 ` Jeff King
2019-04-22 15:46   ` Santiago Torres Arias
2019-04-22 16:02     ` Jeff King
2019-04-22 23:07       ` brian m. carlson
2019-04-22 23:26         ` Santiago Torres Arias
2019-04-23  0:00           ` brian m. carlson
2019-04-23  2:13         ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20190423021312.GC16369@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=santiago@nyu.edu \
    --cc=sunshine@sunshineco.us \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).