MCPcopy Index your code
hub / github.com/git/git / diff_opt_max_depth

Function diff_opt_max_depth

diff.c:6017–6032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6015}
6016
6017static 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

Callers

nothing calls this directly

Calls 2

git_parse_intFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected