[PATCH] Silence "using xxx as default secret key" message with --quiet flag

Kevin J. McCarthy kevin at 8t8.us
Wed Mar 9 22:15:17 CET 2016

Sorry for the drive-by patch.  I've recently started using gpg 2.1, and
now every time I sign a message in mutt, gpg generates the output
  gpg: using "xxxx" as default secret key for signing
despite passing the --quiet flag.

It looks like just adding a check for opt.quiet inside
parse_def_secret_key() should silence this message.

I can't seem to clone the git repos right now, so I'm attaching a simple
diff.  Would it be possible to have this committed?

Thank you,


-------------- next part --------------
--- g10/getkey.c.orig	2016-03-09 13:00:19.591723827 -0800
+++ g10/getkey.c	2016-03-09 13:00:34.175092828 -0800
@@ -1676,11 +1676,11 @@
               print_reported_error (err, GPG_ERR_NO_SECKEY);
-          if (! warned)
+          if (! warned && ! opt.quiet)
             log_info (_("using \"%s\" as default secret key for signing\n"),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: </pipermail/attachments/20160309/dcb89690/attachment-0001.sig>

More information about the Gnupg-devel mailing list