common: Avoid unnecessary ambiguity in argparse.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 10 Jan 2017 20:59:36 +0000 (15:59 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 11 Jan 2017 07:32:20 +0000 (02:32 -0500)
commit7249ab0f95d1f6cb8ee61eefedc79801bb56398f
tree2a14a0042e1fbbf3b18f10b820c69a6797896000
parenta20a450ac4ef10847fd59a5fd3acbbd2bfcaa6a2
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@fifthhorseman.net>
Debian-Bug-Id: 850475
common/argparse.c