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