From: Jeff King Date: Tue, 17 Jan 2017 17:34:33 GMT Subject: Re: [PATCH v5 3/7] tag: add format specifier to gpg_verify_tag Message-ID: <20170117173433.dhz5payccjog4o6s@sigill.intra.peff.net> In-Reply-To: <20170117173346.paqrsroauoskxpn6@LykOS.localdomain> On Tue, Jan 17, 2017 at 12:33:46PM -0500, Santiago Torres wrote: > Yeah, this actually looks more cleaner. > > Let me give it a go. Neat. Note there's a bug: > > diff --git a/builtin/tag.c b/builtin/tag.c > > index 9da11e0c2..068f392b6 100644 > > --- a/builtin/tag.c > > +++ b/builtin/tag.c > > @@ -114,7 +114,11 @@ static int verify_tag(const char *name, const char *ref, > > if (fmt_pretty) > > flags = GPG_VERIFY_QUIET; > > > > - return verify_and_format_tag(sha1, ref, fmt_pretty, flags); > > + if (gpg_verify_tag(sha1, ref, flags)) > > + return -1; > > + > > + pretty_print_ref(name, sha1, fmt_pretty); > > + return 0; The final print should be guarded by "if (fmt_pretty)". -Peff