Thread (11 messages) flat view 11 messages, 2 authors, 2016-06-15
STALE3753d

[RFC PATCH 3/4] verify-tag.c: suppress gpg output if asked

From: Deskin Miller <hidden>
Date: 2016-06-15 22:45:41
Subsystem: the rest · Maintainer: Linus Torvalds

Previously, tag verification would output messages from gpg on standard
error.  Allow this to be controlled by a parameter to verify_tag_sha1.

Signed-off-by: Deskin Miller <redacted>
---
 verify-tag.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/verify-tag.c b/verify-tag.c
index c3e35f3..b47acc9 100644
--- a/verify-tag.c
+++ b/verify-tag.c
@@ -35,13 +35,15 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
 		eol = memchr(buf + len, '\n', size - len);
 		len += eol ? eol - (buf + len) + 1 : size - len;
 	}
-	if (verbose)
+	if (verbose == 1)
 		write_in_full(1, buf, len);
 
 	memset(&gpg, 0, sizeof(gpg));
 	gpg.argv = args_gpg;
 	gpg.in = -1;
 	args_gpg[2] = path;
+	if (verbose == -1)
+		gpg.no_stderr = 1;
 	save_handle = signal(SIGPIPE, SIG_IGN);
 	if (start_command(&gpg)) {
 		unlink(path);
-- 
1.6.0.4.770.ga8394
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help