[git] GnuPG - branch, master, updated. gnupg-2.1.22-14-gb54d75f

by Werner Koch cvs at cvs.gnupg.org
Fri Aug 4 17:15:16 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  b54d75fb1dcfa2cebb3a2497b81ffb49acac2056 (commit)
       via  d9fabcc1989d7235ea0294874803295a30f8711b (commit)
      from  6cba56d436b56ea5e60042144a8a75a2e80007c8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b54d75fb1dcfa2cebb3a2497b81ffb49acac2056
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Aug 4 17:09:17 2017 +0200

    gpg: Avoid double fingerprint printing with import-show.
    
    * g10/import.c (import_one) <IMPORT_SHOW>: Take care of fingerprint
    options.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/import.c b/g10/import.c
index b1b8e0f..5b55f8f 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1778,7 +1778,8 @@ import_one (ctrl_t ctrl,
       merge_keys_done = 1;
       /* Note that we do not want to show the validity because the key
        * has not yet imported.  */
-      list_keyblock_direct (ctrl, keyblock, 0, 0, 1, 1);
+      list_keyblock_direct (ctrl, keyblock, 0, 0,
+                            opt.fingerprint || opt.with_fingerprint, 1);
       es_fflush (es_stdout);
     }
 

commit d9fabcc1989d7235ea0294874803295a30f8711b
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Aug 4 17:03:03 2017 +0200

    gpg: New import option show-only.
    
    * g10/options.h (IMPORT_DRY_RUN): New.
    * g10/import.c (parse_import_options): Add "show-only".
    (import_one): use that as alternative to opt.dry_run.
    --
    
    This is just a convenience thing for
    
      --import-options import-show --dry-run
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/gpg.texi b/doc/gpg.texi
index 1984445..01dfeb7 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -2302,9 +2302,11 @@ opposite meaning. The options are:
   keyserver @option{--receive-keys}.
 
   @item import-show
+  @itemx show-only
   Show a listing of the key as imported right before it is stored.
   This can be combined with the option @option{--dry-run} to only look
-  at keys.
+  at keys; the option @option{show-only} is a shortcut for this
+  combination.
 
   @item import-export
   Run the entire import code but instead of storing the key to the
diff --git a/g10/import.c b/g10/import.c
index 8136625..b1b8e0f 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -190,6 +190,10 @@ parse_import_options(char *str,unsigned int *options,int noisy)
       {"repair-keys", IMPORT_REPAIR_KEYS, NULL,
        N_("repair keys on import")},
 
+      /* No description to avoid string change: Fixme for 2.3 */
+      {"show-only", (IMPORT_SHOW | IMPORT_DRY_RUN), NULL,
+       NULL},
+
       /* Aliases for backward compatibility */
       {"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL,NULL},
       {"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL,NULL},
@@ -1790,7 +1794,7 @@ import_one (ctrl_t ctrl,
       goto leave;
     }
 
-  if (opt.dry_run)
+  if (opt.dry_run || (options & IMPORT_DRY_RUN))
     goto leave;
 
   /* Do we have this key already in one of our pubrings ? */
diff --git a/g10/options.h b/g10/options.h
index 83f4028..8431f75 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -352,6 +352,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
 #define IMPORT_EXPORT                    (1<<9)
 #define IMPORT_RESTORE                   (1<<10)
 #define IMPORT_REPAIR_KEYS               (1<<11)
+#define IMPORT_DRY_RUN                   (1<<12)
 
 #define EXPORT_LOCAL_SIGS                (1<<0)
 #define EXPORT_ATTRIBUTES                (1<<1)

-----------------------------------------------------------------------

Summary of changes:
 doc/gpg.texi  | 4 +++-
 g10/import.c  | 9 +++++++--
 g10/options.h | 1 +
 3 files changed, 11 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list