aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-08-04 15:03:03 +0000
committerWerner Koch <[email protected]>2017-08-04 15:03:03 +0000
commitd9fabcc1989d7235ea0294874803295a30f8711b (patch)
tree4f4fc5dcc5ead6cdaa8f03c809eeff51346ad9b8 /g10/import.c
parentwks: Allow gpg-wks-client --supported with just the domain name (diff)
downloadgnupg-d9fabcc1989d7235ea0294874803295a30f8711b.tar.gz
gnupg-d9fabcc1989d7235ea0294874803295a30f8711b.zip
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/import.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/g10/import.c b/g10/import.c
index 813662537..b1b8e0f9e 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 ? */