git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Kyle Meyer <kyle@kyleam.com>
Date
Aug 23, 2018, 04:04 UTC
Message-ID
<87d0u9ybhk.fsf@kyleam.com>
In-Reply-To
<20180823032238.GI92374@aiede.svl.corp.google.com>
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.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 5 of 20 in “range-diff: update stale summary of --no-dual-color”
  1. range-diff: update stale summary of --no-dual-colorKyle Meyer, Aug 23, 2018
  2. Jonathan NiederAug 23, 2018
  3. Kyle MeyerAug 23, 2018
  4. Jonathan NiederAug 23, 2018
  5. Kyle MeyerAug 23, 2018
  6. Jonathan NiederAug 23, 2018
  7. range-diff: update stale summary of --no-dual-colorKyle Meyer, Aug 23, 2018
  8. Jonathan NiederAug 23, 2018
  9. range-diff: update stale summary of --no-dual-colorKyle Meyer, Aug 23, 2018
  10. Jonathan NiederAug 23, 2018
  11. Junio C HamanoAug 23, 2018
  12. Jonathan NiederAug 23, 2018
  13. Junio C HamanoAug 27, 2018
  14. Johannes SchindelinAug 23, 2018
  15. Jonathan NiederAug 23, 2018
  16. Johannes SchindelinAug 23, 2018
  17. Junio C HamanoAug 23, 2018
  18. Kyle MeyerAug 23, 2018
  19. Junio C HamanoAug 23, 2018
  20. Johannes SchindelinAug 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.