Subject: Re: [PATCH] Make boundary characters for --color-words configurable

From: Dirk Süsserott <[email-masked]>
Date: Sat, 03 May 2008 15:22:15 +0200

Hi Ping,

I highly appreciate your effort into "diff --color-words"
and hope it makes it into the the next release. I wanted
to change the behaviour as well, but when I saw that
git-diff is a builtin, I had to give up. I hoped it was
a perl script and could insert some "\b" regexes somewhere,
but I was wrong. I'm using Git for Windows, you know.

However, I'd like to ask you whether you've done any research
in how to use "--color-words" in gitk? gitk seems to color
the lines only by means of a '+' or '-' sign in the first
column. Hardcoded. I managed to add a checkbox to gitk that
adds the '--color-words' switch to git diff, but when checked
the output is just muddled up. All of those ^] characters
whithin the code. :-(

Dirk

Ping Yin schrieb:
> Signed-off-by: Ping Yin <[email-masked]>
> ---
>   
>> I think config variables should be in alphabetical order in config.txt.
>> Hence your diff.nonwordchars is not in the right place
>>     
>
> THX, this is fixing patch
>
>  Documentation/config.txt |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index eb05592..812ec2c 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -537,6 +537,10 @@ diff.external::
>  	program only on a subset of your files, you might want to
>  	use linkgit:gitattributes[5] instead.
>  
> +diff.nonwordchars::
> +	Specify additional boundary characters other than spaces for
> +	--color-words.
> +
>  diff.renameLimit::
>  	The number of files to consider when performing the copy/rename
>  	detection; equivalent to the git diff option '-l'.
> @@ -546,10 +550,6 @@ diff.renames::
>  	will enable basic rename detection.  If set to "copies" or
>  	"copy", it will detect copies, as well.
>  
> -diff.nonwordchars::
> -    Specify additional boundary characters other than spaces for
> -    --color-words.
> -
>  fetch.unpackLimit::
>  	If the number of objects fetched over the git native
>  	transfer is below this
>