| 6015 | } |
| 6016 | |
| 6017 | static int diff_opt_max_depth(const struct option *opt, |
| 6018 | const char *arg, int unset) |
| 6019 | { |
| 6020 | struct diff_options *options = opt->value; |
| 6021 | |
| 6022 | BUG_ON_OPT_NEG(unset); |
| 6023 | |
| 6024 | if (!git_parse_int(arg, &options->max_depth)) |
| 6025 | return error(_("invalid value for '%s': '%s'"), |
| 6026 | "--max-depth", arg); |
| 6027 | |
| 6028 | options->flags.recursive = 1; |
| 6029 | options->max_depth_valid = options->max_depth >= 0; |
| 6030 | |
| 6031 | return 0; |
| 6032 | } |
| 6033 | |
| 6034 | /* |
| 6035 | * Consider adding new flags to __git_diff_common_options |
nothing calls this directly
no test coverage detected