mirror of
https://github.com/git/git.git
synced 2026-01-12 05:43:12 +09:00
Merge branch 'rs/grep-parseopt-simplify' into maint-2.42
Simplify use of parse-options API a bit. * rs/grep-parseopt-simplify: grep: use OPT_INTEGER_F for --max-depth
This commit is contained in:
commit
2fdfd7594f
@ -924,9 +924,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
|
||||
N_("process binary files with textconv filters")),
|
||||
OPT_SET_INT('r', "recursive", &opt.max_depth,
|
||||
N_("search in subdirectories (default)"), -1),
|
||||
{ OPTION_INTEGER, 0, "max-depth", &opt.max_depth, N_("depth"),
|
||||
N_("descend at most <depth> levels"), PARSE_OPT_NONEG,
|
||||
NULL, 1 },
|
||||
OPT_INTEGER_F(0, "max-depth", &opt.max_depth,
|
||||
N_("descend at most <n> levels"), PARSE_OPT_NONEG),
|
||||
OPT_GROUP(""),
|
||||
OPT_SET_INT('E', "extended-regexp", &opt.pattern_type_option,
|
||||
N_("use extended POSIX regular expressions"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user