From 661a1806819ca98c446f82b19e6c98fa174d33a4 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Wed, 12 Oct 2016 15:04:15 +0200 Subject: gpg-interface: use more status letters According to gpg2's doc/DETAILS: For each signature only one of the codes GOODSIG, BADSIG, EXPSIG, EXPKEYSIG, REVKEYSIG or ERRSIG will be emitted. gpg1 ("classic") behaves the same (although doc/DETAILS differs). Currently, we parse gpg's status output for GOODSIG, BADSIG and trust information and translate that into status codes G, B, U, N for the %G? format specifier. git-verify-* returns success in the GOODSIG case only. This is somewhat in disagreement with gpg, which considers the first 5 of the 6 above as VALIDSIG, but we err on the very safe side. Introduce additional status codes E, X, Y, R for ERRSIG, EXPSIG, EXPKEYSIG, and REVKEYSIG so that a user of %G? gets more information about the absence of a 'G' on first glance. Requested-by: Alex Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- pretty.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pretty.c') diff --git a/pretty.c b/pretty.c index 493edb0a4..f98b27106 100644 --- a/pretty.c +++ b/pretty.c @@ -1232,8 +1232,12 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ switch (c->signature_check.result) { case 'G': case 'B': + case 'E': case 'U': case 'N': + case 'X': + case 'Y': + case 'R': strbuf_addch(sb, c->signature_check.result); } break; -- cgit v1.2.1