From: Stephen Boyd Date: Wed, 1 Dec 2010 23:30:40 +0000 (-0600) Subject: parse-options: do not infer PARSE_OPT_NOARG from option type X-Git-Tag: v1.7.4-rc0~51^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c1f4ec9ef45232d6dbdea4c417a9d41eb8ad7f4f?ds=inline;hp=c1f4ec9ef45232d6dbdea4c417a9d41eb8ad7f4f 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 Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano ---