Hi Jonathan,
On Wed, 22 Aug 2018, Jonathan Nieder wrote:
> OPT_INTEGER(0, "creation-factor", &creation_factor,
> N_("Percentage by which creation is weighted")),
> - OPT_BOOL(0, "no-dual-color", &simple_color,
> - N_("color both diff and diff-between-diffs")),
> + OPT_BOOL(0, "dual-color", &dual_color,
> + N_("color both diff and diff-between-diffs
> (default)")),
There is one very good reason *not* to do that. And that reason is the
output of `git range-diff -h`. If anybody read that the option
`--dual-color` exists, they are prone to believe that the default is *not*
dual color. In contrast, when reading `--no-dual-color`, it is clear that
dual color mode is the default.
Ciao,
Dscho
> OPT_END()
> };
> int i, j, res = 0;
> @@ -63,8 +63,8 @@ int cmd_range_diff(int argc, const char **argv, const char
> *prefix)
> options + ARRAY_SIZE(options) - 1, /* OPT_END */
> builtin_range_diff_usage, 0);
>
> - if (simple_color < 1) {
> - if (!simple_color)
> + if (dual_color != 0) {
> + if (dual_color > 0)
> /* force color when --dual-color was used */
> diffopt.use_color = 1;
> diffopt.flags.dual_color_diffed_diffs = 1;
>