diff options
author | Stephen Boyd <bebarino@gmail.com> | 2010-12-01 17:30:40 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-07 14:19:32 -0800 |
commit | c1f4ec9ef45232d6dbdea4c417a9d41eb8ad7f4f (patch) | |
tree | da050b7810cb8f2a51e5e4830667fc2870f2f95e /reachable.h | |
parent | parse-options: sanity check PARSE_OPT_NOARG flag (diff) | |
download | tgif-c1f4ec9ef45232d6dbdea4c417a9d41eb8ad7f4f.tar.xz |
parse-options: do not infer PARSE_OPT_NOARG from option type
Simplify the "takes no value" error path by relying on PARSE_OPT_NOARG
being set correctly. That is:
- if the PARSE_OPT_NOARG flag is set, reject --opt=value
regardless of the option type;
- if the PARSE_OPT_NOARG flag is unset, accept --opt=value
regardless of the option type.
This way, the accepted usage more closely matches the usage advertised
with --help-all.
No functional change intended, since the NOARG flag is only used
with "boolean-only" option types in existing parse_options callers.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.h')
0 files changed, 0 insertions, 0 deletions