git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Alex <agrambot@gmail.com>, git@vger.kernel.org
Subject: Re: Request: Extra case for %G? format
Date: Mon, 26 Sep 2016 13:53:57 +0200	[thread overview]
Message-ID: <f056af47-ca98-b35c-e343-9f246c0c8f5b@drmicha.warpmail.net> (raw)
In-Reply-To: <87d1js1pl1.fsf@gmail.com>

Alex venit, vidit, dixit 25.09.2016 08:05:
> Hello all,
> 
> Could the %G? format differentiate between an unsigned commit and a
> signed commit that you're missing a public key for?
> 
> If `git show --format=%GG --no-patch <commit>' produces an output like
> the following:
> 
> gpg: Signature made <date> using RSA key ID <id>
> gpg: Can't check signature: public key not found

That is the "raw verification message from GPG for a signed commit" as
per git-log(1).

> Then currently %G? results in `N', the same as an unsigned commit.
> 
> In this case, could %G? please result in a new character? Perhaps `M'
> for "missing public key"?

Yes, and no.

Really, there are many different reasons why a signature couldn't be
checked, but gpg itself has these status results:

"For each signature only one of the three codes GOODSIG, BADSIG or
ERRSIG will be emitted" (doc/DETAILS in gpg's source).

ERRSIG comes with additional info (RC) that could be parsed for the reason.

Also, in addition to that line, there can be other lines with additional
information. So there is a lot that could potentially be shown (and *is*
shown with %GG). In the GOODSIG case, we parse the TRUST info to take
the trust model into account (and return U for untrusted good).

I wouldn't mind adding E to %G? in the ERRSIG case, even though one has
to look at %GG in any case (N or E) if one wants to have more details.

Cheers,
Michael


  reply	other threads:[~2016-09-26 11:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-25  6:05 Request: Extra case for %G? format Alex
2016-09-26 11:53 ` Michael J Gruber [this message]
2016-09-26 17:18   ` Alex
2016-09-27 14:31     ` [PATCH] gpg-interface: use more status letters Michael J Gruber
2016-09-27 17:25       ` Junio C Hamano
2016-09-28 14:24         ` [PATCH v2] " Michael J Gruber
2016-09-28 15:10           ` Ramsay Jones
2016-09-28 19:59           ` Junio C Hamano
2016-09-28 21:09             ` Ramsay Jones
2016-09-30  9:41               ` Michael J Gruber
2016-09-30 16:16                 ` Junio C Hamano
2016-10-06 21:43                   ` Junio C Hamano
2016-10-10 12:59                     ` Michael J Gruber
2016-10-10 17:58                       ` Junio C Hamano
2016-10-12 13:04                         ` [PATCH v3] " Michael J Gruber
2016-09-30  9:33             ` [PATCH v2] " Michael J Gruber

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=f056af47-ca98-b35c-e343-9f246c0c8f5b@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=agrambot@gmail.com \
    --cc=git@vger.kernel.org \
    /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).