[git] GnuPG - branch, master, updated. gnupg-2.1.17-57-g7249ab0
by Daniel Kahn Gillmor
cvs at cvs.gnupg.org
Wed Jan 11 08:34:29 CET 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 7249ab0f95d1f6cb8ee61eefedc79801bb56398f (commit)
from a20a450ac4ef10847fd59a5fd3acbbd2bfcaa6a2 (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 7249ab0f95d1f6cb8ee61eefedc79801bb56398f
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Tue Jan 10 15:59:36 2017 -0500
common: Avoid unnecessary ambiguity in argparse.
* common/argparse.c (find_long_option): Avoid unnecessary ambiguity.
--
If two struct ARGPARSE_OPTS share a prefix in their long_opt name, but
have the exact same short_opt and flags, they are aliases and not
distinct options. Avoid reporting this as an ambiguity, so that (for
example) both --clearsign and --clear-sign can be invoked as --clear.
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Debian-Bug-Id: 850475
diff --git a/common/argparse.c b/common/argparse.c
index dce725a..d395229 100644
--- a/common/argparse.c
+++ b/common/argparse.c
@@ -898,7 +898,9 @@ find_long_option( ARGPARSE_ARGS *arg,
int j;
for(j=i+1; opts[j].short_opt; j++ ) {
if( opts[j].long_opt
- && !strncmp( opts[j].long_opt, keyword, n ) )
+ && !strncmp( opts[j].long_opt, keyword, n )
+ && !(opts[j].short_opt == opts[i].short_opt
+ && opts[j].flags == opts[i].flags ) )
return -2; /* abbreviation is ambiguous */
}
return i;
-----------------------------------------------------------------------
Summary of changes:
common/argparse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list