From: Ping Yin Date: Sun, 04 May 2008 00:32:54 GMT Subject: Re: [PATCH v2 4/5] Make boundary characters for --color-words configurable Message-ID: <46dff0320805031732x25286707r991358162046c07c@mail.gmail.com> In-Reply-To: <7vy76rtfns.fsf@gitster.siamese.dyndns.org> On Sun, May 4, 2008 at 2:18 AM, Junio C Hamano wrote: > Has this series been ever tested? > > $ git diff one two > diff --git a/one b/two > index f9facd3..10c6195 100644 > --- a/one > +++ b/two > @@ -1 +1 @@ > -A quick(brown) fox > +A quick(yellow) fox > > $ tail -n 2 .git/config > [diff] > nonwordchars = "()" > > $ git diff --color-words one two > diff --git a/one b/two > index f9facd3..10c6195 100644 > --- a/one > +++ b/two > @@ -1 +1 @@ > A quick(brown)yellow) fox Yeah, i tested it. It's a better improvement, although not the best. As i said in the commit msg If we set diff.nonwordchars to "()", the example above will show as "if (foo(bar(arg))". It's much better, athough not the best. As you said in another thread, unless we insert LF between run of word chars and run of nonword chars, the is no way to achieve the best result. I have try my best to achieve a better output in current implementation (say, replace nonword chars with LF) -- Ping Yin