Teach/Fix pull/fetch -q/-v options
Implement git-pull --quiet and git-pull --verbose by adding the options to git-pull and fixing verbosity handling in git-fetch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a0d3ab9c27
commit
7f87aff22c
@ -150,9 +150,15 @@ extern int parse_options_end(struct parse_opt_ctx_t *ctx);
|
||||
/*----- some often used options -----*/
|
||||
extern int parse_opt_abbrev_cb(const struct option *, const char *, int);
|
||||
extern int parse_opt_approxidate_cb(const struct option *, const char *, int);
|
||||
extern int parse_opt_verbosity_cb(const struct option *, const char *, int);
|
||||
|
||||
#define OPT__VERBOSE(var) OPT_BOOLEAN('v', "verbose", (var), "be verbose")
|
||||
#define OPT__QUIET(var) OPT_BOOLEAN('q', "quiet", (var), "be quiet")
|
||||
#define OPT__VERBOSITY(var) \
|
||||
{ OPTION_CALLBACK, 'v', "verbose", (var), NULL, "be more verbose", \
|
||||
PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }, \
|
||||
{ OPTION_CALLBACK, 'q', "quiet", (var), NULL, "be more quiet", \
|
||||
PARSE_OPT_NOARG, &parse_opt_verbosity_cb, 0 }
|
||||
#define OPT__DRY_RUN(var) OPT_BOOLEAN('n', "dry-run", (var), "dry run")
|
||||
#define OPT__ABBREV(var) \
|
||||
{ OPTION_CALLBACK, 0, "abbrev", (var), "n", \
|
||||
|
Reference in New Issue
Block a user