Thread (41 messages) flat view 41 messages, 4 authors, 2016-06-15

Re: [PATCH 2/6] parse-options: do not infer PARSE_OPT_NOARG from option type

From: Stephen Boyd <hidden>
Date: 2016-06-15 22:50:08

On 11/29/10 19:04, Jonathan Nieder wrote:
From: Stephen Boyd <redacted>

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 <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
Thanks for the nice words.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help