Thread (21 messages) 21 messages, 2 authors, 2017-01-17

Re: [PATCH v5 3/7] tag: add format specifier to gpg_verify_tag

flat view

From: Jeff King <hidden>
Date: 2017-01-17 17:41:31

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:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help