Re: [PATCH] --color-words: Make the word characters configurable
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 3, 2008, 14:23 UTC
- Message-ID
- <alpine.DEB.1.00.0805031522360.30431@racer>
- In-Reply-To
- <46dff0320805030713r673ea479u37018333c32131bb@mail.gmail.com>
Hi,
On Sat, 3 May 2008, Ping Yin wrote:
Show 32 quoted lines
> On Sat, May 3, 2008 at 10:03 PM, Johannes Schindelin > <Johannes.Schindelin@gmx.de> wrote: > > > > Now, you can specify which characters are to be interpreted as word > > characters with "--color-words=A-Za-z", or by setting the config variable > > diff.wordCharacters. > > > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > > --- > > > > I would have preferred an approach like this. > > > > Documentation/config.txt | 6 ++++ > > Documentation/diff-options.txt | 8 ++++- > > README | 2 +- > > diff.c | 64 +++++++++++++++++++++++++++++++++++++++- > > 4 files changed, 77 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/config.txt b/Documentation/config.txt > > index 05bf2df..663d82b 100644 > > --- a/Documentation/config.txt > > +++ b/Documentation/config.txt > > @@ -546,6 +546,12 @@ diff.renames:: > > will enable basic rename detection. If set to "copies" or > > "copy", it will detect copies, as well. > > > > +diff.wordcharacters:: > > + This config setting overrides which characters are interpreted as > > + word characters by the --color-words option of linkgit:git-diff[1]. > > I think a-zA-Z0-9_ should always be word characters. We can't override > them, instead, we just extend them.
No. That is exactly the artificial-limitation-by-design I do not want.
> > -"git" can mean anything, depending on your mood. > > +"git" cann mean anything, depending on your mood. > > Why replacing can as cann?
Because I am stupid and committed my test case. Of course, this patch was done under time pressure, because I have to leave for the day, like, right now.
Ciao, Dscho