Re: [PATCH v2 4/5] Make boundary characters for --color-words configurable
- From
- Teemu Likonen <tlikonen@iki.fi>
- Date
- May 3, 2008, 18:41 UTC
- Message-ID
- <20080503184126.GA21187@mithlond.arda.local>
- In-Reply-To
- <7vy76rtfns.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote (2008-05-03 11:18 -0700):
Show 22 quoted lines
> 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(<red>brown)</red><green>yellow)</green> fox
I've been testing but not quite sure what to think about the above output. Is this more natural and expected output:
A quick(<red>brown</red><green>yellow</green>) fox
i.e. no ()'s between the changed words? Although this
-A quick brown fox +A quick yellow fox
has always became this:
A quick <red>brown</red> <green>yellow</green> fox
------^
(Notice space here) So there is kind of "added space" but I guess technically it's actually like this:
A quick <red>brown </red><green>yellow </green>fox
So I think space is consistent with parentheses in your example.