[PATCH 2/4] OPT__VERBOSE(): clarify its expected use by using OPT_COUNTUP
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 6, 2013, 23:31 UTC
- Message-ID
- <1375831889-9610-3-git-send-email-gitster@pobox.com>
- In-Reply-To
- <1375831889-9610-1-git-send-email-gitster@pobox.com>
The parseopt parsing for OPT__VERBOSE() is implemented in terms of OPT_BOOLEAN() and users of it do take advantage of the "counting up" behaviour to implement increasing levels of verbosity by differentiating "git cmd -v" and "git cmd -v -v".
Clarify this by explicitly using OPT_COUNTUP() instead.
Signed-off-by: Junio C Hamano <gitster@pobox.com> --- parse-options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parse-options.h b/parse-options.h index f2b01ee..582dd4b 100644 --- a/parse-options.h +++ b/parse-options.h @@ -230,7 +230,7 @@ extern int parse_opt_tertiary(const struct option *, const char *, int); extern int parse_opt_string_list(const struct option *, const char *, int); extern int parse_opt_noop_cb(const struct option *, const char *, int); -#define OPT__VERBOSE(var, h) OPT_BOOLEAN('v', "verbose", (var), (h)) +#define OPT__VERBOSE(var, h) OPT_COUNTUP('v', "verbose", (var), (h)) #define OPT__QUIET(var, h) OPT_BOOL('q', "quiet", (var), (h)) #define OPT__VERBOSITY(var) \ { OPTION_CALLBACK, 'v', "verbose", (var), NULL, N_("be more verbose"), \
-- 1.8.4-rc1-210-gf6d87e2