| 5604 | } |
| 5605 | |
| 5606 | static 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 | |
| 5627 | static int diff_opt_color_moved_ws(const struct option *opt, |
| 5628 | const char *arg, int unset) |
nothing calls this directly
no test coverage detected