MCPcopy Create free account
hub / github.com/git/git / diff_opt_color_moved

Function diff_opt_color_moved

diff.c:5606–5625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5604}
5605
5606static int diff_opt_color_moved(const struct option *opt,
5607 const char *arg, int unset)
5608{
5609 struct diff_options *options = opt->value;
5610
5611 if (unset) {
5612 options->color_moved = COLOR_MOVED_NO;
5613 } else if (!arg) {
5614 if (diff_color_moved_default)
5615 options->color_moved = diff_color_moved_default;
5616 if (options->color_moved == COLOR_MOVED_NO)
5617 options->color_moved = COLOR_MOVED_DEFAULT;
5618 } else {
5619 int cm = parse_color_moved(arg);
5620 if (cm < 0)
5621 return error(_("bad --color-moved argument: %s"), arg);
5622 options->color_moved = cm;
5623 }
5624 return 0;
5625}
5626
5627static int diff_opt_color_moved_ws(const struct option *opt,
5628 const char *arg, int unset)

Callers

nothing calls this directly

Calls 2

parse_color_movedFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected