Skip to content

Commit 053fbe6

Browse files
committed
Merge branch 'nd/remove-opt-boolean'
* nd/remove-opt-boolean: parse-options: remove OPT_BOOLEAN
2 parents 0067272 + 212c0a6 commit 053fbe6

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

parse-options.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ struct option {
161161
N_("no-op (backward compatibility)"), \
162162
PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, parse_opt_noop_cb }
163163

164-
/* Deprecated synonym */
165-
#define OPT_BOOLEAN OPT_COUNTUP
166-
167164
/* parse_options() will filter out the processed options and leave the
168165
* non-option arguments in argv[]. usagestr strings should be marked
169166
* for translation with N_().
@@ -232,15 +229,15 @@ extern int parse_opt_tertiary(const struct option *, const char *, int);
232229
extern int parse_opt_string_list(const struct option *, const char *, int);
233230
extern int parse_opt_noop_cb(const struct option *, const char *, int);
234231

235-
#define OPT__VERBOSE(var, h) OPT_BOOLEAN('v', "verbose", (var), (h))
236-
#define OPT__QUIET(var, h) OPT_BOOLEAN('q', "quiet", (var), (h))
232+
#define OPT__VERBOSE(var, h) OPT_COUNTUP('v', "verbose", (var), (h))
233+
#define OPT__QUIET(var, h) OPT_COUNTUP('q', "quiet", (var), (h))
237234
#define OPT__VERBOSITY(var) \
238235
{ OPTION_CALLBACK, 'v', "verbose", (var), NULL, N_("be more verbose"), \
239236
PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }, \
240237
{ OPTION_CALLBACK, 'q', "quiet", (var), NULL, N_("be more quiet"), \
241238
PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }
242-
#define OPT__DRY_RUN(var, h) OPT_BOOLEAN('n', "dry-run", (var), (h))
243-
#define OPT__FORCE(var, h) OPT_BOOLEAN('f', "force", (var), (h))
239+
#define OPT__DRY_RUN(var, h) OPT_BOOL('n', "dry-run", (var), (h))
240+
#define OPT__FORCE(var, h) OPT_COUNTUP('f', "force", (var), (h))
244241
#define OPT__ABBREV(var) \
245242
{ OPTION_CALLBACK, 0, "abbrev", (var), N_("n"), \
246243
N_("use <n> digits to display SHA-1s"), \

0 commit comments

Comments
 (0)