threads / patch / 49197

patchrange-diff: update stale summary of --no-dual-color

Subject: [PATCH] range-diff: update stale summary of --no-dual-color

## tl;dr

20 messages between Aug 23, 2018 and Aug 27, 2018. Diffs are folded; open one to read it.

replies: 19people: 4as markdown or json

Kyle Meyer· Aug 23, 2018, 02:39 UTC · lore

275267937b (range-diff: make dual-color the default mode, 2018-08-13) replaced --dual-color with --no-dual-color but left the option's summary untouched. Rewrite the summary to describe --no-dual-color rather than dual-color.

Signed-off-by: Kyle Meyer <kyle@kyleam.com>
---
 builtin/range-diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/range-diff.c +1 −1
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index f52d45d9d6..7dc90a5ec3 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -25,7 +25,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
 		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")),
+			    N_("restrict coloring to outer diff markers")),
 		OPT_END()
 	};
 	int i, j, res = 0;
-- 
2.18.0
Jonathan Nieder· Aug 23, 2018, 02:47 UTC · re: Kyle Meyer · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Hi,
Kyle Meyer wrote:
Show 9 quoted lines
> 275267937b (range-diff: make dual-color the default mode, 2018-08-13)
> replaced --dual-color with --no-dual-color but left the option's
> summary untouched.  Rewrite the summary to describe --no-dual-color
> rather than dual-color.
>
> Signed-off-by: Kyle Meyer <kyle@kyleam.com>
> ---
>  builtin/range-diff.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, good catch!
Show 10 quoted lines
> diff --git a/builtin/range-diff.c b/builtin/range-diff.c
> index f52d45d9d6..7dc90a5ec3 100644
> --- a/builtin/range-diff.c
> +++ b/builtin/range-diff.c
> @@ -25,7 +25,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
>  		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")),
> +			    N_("restrict coloring to outer diff markers")),
What is an outer diff marker?

Thanks, Jonathan

Kyle Meyer· Aug 23, 2018, 03:03 UTC · re: Jonathan Nieder · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Jonathan Nieder <jrnieder@gmail.com> writes:
[...]
> What is an outer diff marker?

The diff markers from the diff of patches as opposed to the ones from the original patches. I took the term from git-range-diff.txt:

    --no-dual-color::
        When the commit diffs differ, `git range-diff` recreates the
        original diffs' coloring, and adds outer -/+ diff markers [...]
    Use `--no-dual-color` to revert to color all lines according to the
    outer diff markers (and completely ignore the inner diff when it
    comes to color).
-- 
Kyle
Jonathan Nieder· Aug 23, 2018, 03:22 UTC · re: Kyle Meyer · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Kyle Meyer wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Kyle Meyer wrote:
>>> -			    N_("color both diff and diff-between-diffs")),
>>> +			    N_("restrict coloring to outer diff markers")),
[...]
Show 12 quoted lines
>> What is an outer diff marker?
>
> The diff markers from the diff of patches as opposed to the ones from
> the original patches.  I took the term from git-range-diff.txt:
>
>     --no-dual-color::
>         When the commit diffs differ, `git range-diff` recreates the
>         original diffs' coloring, and adds outer -/+ diff markers [...]
>
>     Use `--no-dual-color` to revert to color all lines according to the
>     outer diff markers (and completely ignore the inner diff when it
>     comes to color).
Aha: I think you're missing a few words (e.g. "color only according to
outer diff markers").  Though based on the output, I'm not sure the
focus on diff markers captures the difference.  (After all, some lines
are multiple colors in --no-dual-color mode and have no diff markers.)

"Restrict coloring to outer -/+ diff markers" would mean that everything will be in plain text, except for the minus or plus sign at the beginning of each line. So you'd see a colorful strip on the left and everything else monochrome.

I think what you mean is something like "color only based on the diff-between-diffs". Or it might be simpler to do something like the following. What do you think?

Show changes to diff +5 −5
diff --git i/builtin/range-diff.c w/builtin/range-diff.c
index f52d45d9d6..88c19f48d3 100644
--- i/builtin/range-diff.c
+++ w/builtin/range-diff.c
@@ -20,12 +20,12 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
 {
 	int creation_factor = 60;
 	struct diff_options diffopt = { NULL };
-	int simple_color = -1;
+	int dual_color = -1;
 	struct option options[] = {
 		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)")),
 		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;
Kyle Meyer· Aug 23, 2018, 04:04 UTC · re: Jonathan Nieder · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Jonathan Nieder <jrnieder@gmail.com> writes:
>>>> -			    N_("color both diff and diff-between-diffs")),
>>>> +			    N_("restrict coloring to outer diff markers")),
[...]
Show 9 quoted lines
> Aha: I think you're missing a few words (e.g. "color only according to
> outer diff markers").  Though based on the output, I'm not sure the
> focus on diff markers captures the difference.  (After all, some lines
> are multiple colors in --no-dual-color mode and have no diff markers.)
>
> "Restrict coloring to outer -/+ diff markers" would mean that
> everything will be in plain text, except for the minus or plus sign at
> the beginning of each line.  So you'd see a colorful strip on the left
> and everything else monochrome.
Eh, you're right, it would read like that.  Thanks.
> I think what you mean is something like "color only based on the
> diff-between-diffs".

Yeah, I that sounds OK to me. I played around with a few different summary lines and couldn't come up with anything that I thought was particularly good, and then of course I ended up settling on a summary line that didn't preserve my intended meaning :/

Show 20 quoted lines
> Or it might be simpler to do something like
> the following.  What do you think?
>
> diff --git i/builtin/range-diff.c w/builtin/range-diff.c
> index f52d45d9d6..88c19f48d3 100644
> --- i/builtin/range-diff.c
> +++ w/builtin/range-diff.c
> @@ -20,12 +20,12 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
>  {
>  	int creation_factor = 60;
>  	struct diff_options diffopt = { NULL };
> -	int simple_color = -1;
> +	int dual_color = -1;
>  	struct option options[] = {
>  		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)")),

I don't have a strong preference, though I lean towards making 'git range-diff -h' show --no-dual-color since it's not the default.

Jonathan Nieder· Aug 23, 2018, 08:27 UTC · re: Kyle Meyer · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Kyle Meyer wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> I think what you mean is something like "color only based on the
>> diff-between-diffs".
>
> Yeah, I that sounds OK to me.
Thanks.  Want to prepare a patch along those lines to finish this off?
I'm off to sleep now, can look at this again tomorrow morning.

Thanks, Jonathan

Kyle Meyer· Aug 23, 2018, 12:00 UTC · re: Jonathan Nieder · lore

[PATCH v2] range-diff: update stale summary of --no-dual-color

275267937b (range-diff: make dual-color the default mode, 2018-08-13) replaced --dual-color with --no-dual-color but left the option's summary untouched. Rewrite the summary to describe --no-dual-color rather than dual-color.

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Kyle Meyer <kyle@kyleam.com>
---
 builtin/range-diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/range-diff.c +1 −1
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index f52d45d9d6..057afdbf46 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -25,7 +25,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
 		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")),
+			    N_("color only based on the diff-between-diffs")),
 		OPT_END()
 	};
 	int i, j, res = 0;
-- 
2.18.0
Jonathan Nieder· Aug 23, 2018, 21:10 UTC · re: Kyle Meyer · lore

Re: [PATCH v2] range-diff: update stale summary of --no-dual-color

Kyle Meyer wrote:
>  		OPT_BOOL(0, "no-dual-color", &simple_color,
> -			    N_("color both diff and diff-between-diffs")),
> +			    N_("color only based on the diff-between-diffs")),
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Dscho's suggestion "use simple diff colors" also sounds fine to me (probably even better).

Thanks, Jonathan

Kyle Meyer· Aug 23, 2018, 21:57 UTC · re: Jonathan Nieder · lore

[PATCH v3] range-diff: update stale summary of --no-dual-color

275267937b (range-diff: make dual-color the default mode, 2018-08-13) replaced --dual-color with --no-dual-color but left the option's summary untouched. Rewrite the summary to describe --no-dual-color rather than dual-color.

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Kyle Meyer <kyle@kyleam.com>
---
 builtin/range-diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/range-diff.c +1 −1
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index f52d45d9d6..0aa9bed41f 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -25,7 +25,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
 		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")),
+			    N_("use simple diff colors")),
 		OPT_END()
 	};
 	int i, j, res = 0;
-- 
2.18.0
Jonathan Nieder· Aug 23, 2018, 22:02 UTC · re: Kyle Meyer · lore

Re: [PATCH v3] range-diff: update stale summary of --no-dual-color

Kyle Meyer wrote:
Show 6 quoted lines
> 275267937b (range-diff: make dual-color the default mode, 2018-08-13)
> replaced --dual-color with --no-dual-color but left the option's
> summary untouched.  Rewrite the summary to describe --no-dual-color
> rather than dual-color.
>
> Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Ha, I don't think I deserve much credit here, but I'll take it. ;-)
Show 5 quoted lines
> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Signed-off-by: Kyle Meyer <kyle@kyleam.com>
> ---
>  builtin/range-diff.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Junio C Hamano· Aug 23, 2018, 22:08 UTC · re: Jonathan Nieder · lore

Re: [PATCH v3] range-diff: update stale summary of --no-dual-color

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 18 quoted lines
> Kyle Meyer wrote:
>
>> 275267937b (range-diff: make dual-color the default mode, 2018-08-13)
>> replaced --dual-color with --no-dual-color but left the option's
>> summary untouched.  Rewrite the summary to describe --no-dual-color
>> rather than dual-color.
>>
>> Helped-by: Jonathan Nieder <jrnieder@gmail.com>
>
> Ha, I don't think I deserve much credit here, but I'll take it. ;-)
>
>> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
>> Signed-off-by: Kyle Meyer <kyle@kyleam.com>
>> ---
>>  builtin/range-diff.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Sorry, too late. I'll revert the merge of the previous round out of 'next' and requeue this one, but that will have to wait until the next integration cycle.

Jonathan Nieder· Aug 23, 2018, 22:11 UTC · re: Junio C Hamano · lore

Re: [PATCH v3] range-diff: update stale summary of --no-dual-color

Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Kyle Meyer wrote:
>>> Subject: [PATCH v3] range-diff: update stale summary of --no-dual-color
[...]
Show 5 quoted lines
>> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>
> Sorry, too late.  I'll revert the merge of the previous round out of
> 'next' and requeue this one, but that will have to wait until the
> next integration cycle.
Thanks for the heads up.  Sounds like a fine plan.
Jonathan
Junio C Hamano· Aug 27, 2018, 17:57 UTC · re: Jonathan Nieder · lore

Re: [PATCH v3] range-diff: update stale summary of --no-dual-color

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 13 quoted lines
> Junio C Hamano wrote:
>> Jonathan Nieder <jrnieder@gmail.com> writes:
>>> Kyle Meyer wrote:
>
>>>> Subject: [PATCH v3] range-diff: update stale summary of --no-dual-color
> [...]
>>> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>>
>> Sorry, too late.  I'll revert the merge of the previous round out of
>> 'next' and requeue this one, but that will have to wait until the
>> next integration cycle.
>
> Thanks for the heads up.  Sounds like a fine plan.

Having said that, I do not think the change from v2 to v3 is an improvement. At least the one in v2 explained what the input is to the logic to determine colors, helping the users to understand what is painted and why and decide if that coloring is useful to them.

The phrasing in v3, "use simple diff colors", does not give much information over saying something like "paint it differently" (which is silly because "differently" is a given, once you give an option to cause a non-default behaviour).

Not limited to this particular case, but in general, subjective words like "simple" have much less information density than more specific words, and we need to be careful when spending bits on a limited space (like option description) to them.

Johannes Schindelin· Aug 23, 2018, 14:31 UTC · re: Jonathan Nieder · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Hi Jonathan,
On Wed, 22 Aug 2018, Jonathan Nieder wrote:
Show 6 quoted lines
>  		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

Show 15 quoted lines
>  		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;
> 
Jonathan Nieder· Aug 23, 2018, 21:12 UTC · re: Johannes Schindelin · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Hi,
Johannes Schindelin wrote:
> On Wed, 22 Aug 2018, Jonathan Nieder wrote:
Show 12 quoted lines
>>  		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.

The whole patch is about "git range-diff -h" output, and of course I tested it. Did you see the "(default)" part of the string in the patch?

That said, the conversation continued and I agree with the conclusion it led to (which is better than the patch you're replying to).

Thanks, Jonathan

Johannes Schindelin· Aug 23, 2018, 20:54 UTC · re: Kyle Meyer · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Hi Kyle,
On Wed, 22 Aug 2018, Kyle Meyer wrote:
Show 20 quoted lines
> 275267937b (range-diff: make dual-color the default mode, 2018-08-13)
> replaced --dual-color with --no-dual-color but left the option's
> summary untouched.  Rewrite the summary to describe --no-dual-color
> rather than dual-color.
> 
> Signed-off-by: Kyle Meyer <kyle@kyleam.com>
> ---
>  builtin/range-diff.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/builtin/range-diff.c b/builtin/range-diff.c
> index f52d45d9d6..7dc90a5ec3 100644
> --- a/builtin/range-diff.c
> +++ b/builtin/range-diff.c
> @@ -25,7 +25,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
>  		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")),
> +			    N_("restrict coloring to outer diff markers")),
How about "use simple diff colors" instead?

Ciao, Johannes

Junio C Hamano· Aug 23, 2018, 21:18 UTC · re: Johannes Schindelin · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 24 quoted lines
> On Wed, 22 Aug 2018, Kyle Meyer wrote:
>
>> 275267937b (range-diff: make dual-color the default mode, 2018-08-13)
>> replaced --dual-color with --no-dual-color but left the option's
>> summary untouched.  Rewrite the summary to describe --no-dual-color
>> rather than dual-color.
>> 
>> Signed-off-by: Kyle Meyer <kyle@kyleam.com>
>> ---
>>  builtin/range-diff.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/builtin/range-diff.c b/builtin/range-diff.c
>> index f52d45d9d6..7dc90a5ec3 100644
>> --- a/builtin/range-diff.c
>> +++ b/builtin/range-diff.c
>> @@ -25,7 +25,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
>>  		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")),
>> +			    N_("restrict coloring to outer diff markers")),
>
> How about "use simple diff colors" instead?

I am wondering if it makes sense to remove the option altogether. I've been trying to view the comparison of the same ranges in both styles for the past few days, and I never found a reason to choose "no dual color" option myself.

Kyle Meyer· Aug 23, 2018, 21:27 UTC · re: Junio C Hamano · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Junio C Hamano <gitster@pobox.com> writes:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
[...]
>>> -			    N_("color both diff and diff-between-diffs")),
>>> +			    N_("restrict coloring to outer diff markers")),
>>
>> How about "use simple diff colors" instead?

That's certainly better than the one above, and I also prefer it to "color only based on the diff-between-diffs" in v2.

> I am wondering if it makes sense to remove the option altogether.
> I've been trying to view the comparison of the same ranges in both
> styles for the past few days, and I never found a reason to choose
> "no dual color" option myself.
But I like this suggestion even better.
Junio C Hamano· Aug 23, 2018, 21:48 UTC · re: Kyle Meyer · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Kyle Meyer <kyle@kyleam.com> writes:
Show 20 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> [...]
>
>>>> -			    N_("color both diff and diff-between-diffs")),
>>>> +			    N_("restrict coloring to outer diff markers")),
>>>
>>> How about "use simple diff colors" instead?
>
> That's certainly better than the one above, and I also prefer it to
> "color only based on the diff-between-diffs" in v2.
>
>> I am wondering if it makes sense to remove the option altogether.
>> I've been trying to view the comparison of the same ranges in both
>> styles for the past few days, and I never found a reason to choose
>> "no dual color" option myself.
>
> But I like this suggestion even better.

That wasn't even a suggestion. I just did not see the point of the optional behaviour myself, and was soliciting concrete examples where the --no-dual mode would help.

Johannes Schindelin· Aug 23, 2018, 21:41 UTC · re: Junio C Hamano · lore

Re: [PATCH] range-diff: update stale summary of --no-dual-color

Hi Junio,
On Thu, 23 Aug 2018, Junio C Hamano wrote:
Show 31 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Wed, 22 Aug 2018, Kyle Meyer wrote:
> >
> >> 275267937b (range-diff: make dual-color the default mode, 2018-08-13)
> >> replaced --dual-color with --no-dual-color but left the option's
> >> summary untouched.  Rewrite the summary to describe --no-dual-color
> >> rather than dual-color.
> >> 
> >> Signed-off-by: Kyle Meyer <kyle@kyleam.com>
> >> ---
> >>  builtin/range-diff.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/builtin/range-diff.c b/builtin/range-diff.c
> >> index f52d45d9d6..7dc90a5ec3 100644
> >> --- a/builtin/range-diff.c
> >> +++ b/builtin/range-diff.c
> >> @@ -25,7 +25,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
> >>  		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")),
> >> +			    N_("restrict coloring to outer diff markers")),
> >
> > How about "use simple diff colors" instead?
> 
> I am wondering if it makes sense to remove the option altogether.
> I've been trying to view the comparison of the same ranges in both
> styles for the past few days, and I never found a reason to choose
> "no dual color" option myself.

We do have a track record of making decisions based on our little bubble, don't we.

On IRC, there is at least on publicly viewable comment by a user who preferred the simple color diff, at least in one use case:

http://colabti.org/irclogger/irclogger_log/git-devel?date=2018-07-13#l97

And I am living in my own bubble, too. I think I heard feedback regarding range-diff from some dozen people. Multiplying 6% by the download numbers of Git for Windows alone... that's a lot of people who can put --no-dual-color to good use at least in *some* situations.

In short: I am hesitant to remove a feature that would help some users.

Ciao, Dscho

← back to recent threads