From: Thomas Rast Date: Wed, 14 Jan 2009 19:55:21 GMT Subject: Re: [PATCH 4/4] color-words: take an optional regular expression describing words Message-ID: <200901142055.27222.trast@student.ethz.ch> In-Reply-To: Johannes Schindelin wrote: > ---color-words:: > +--color-words[=regex]:: > Show colored word diff, i.e. color words which have changed. > ++ > +Optionally, you can pass a regular expression that tells Git what the > +words are that you are looking for; The default is to interpret any > +stretch of non-whitespace as a word. Perhaps you could resurrect the documentation from my series, adjusted for the different newline rule: --color-words[=]:: Show colored word diff, i.e., color words which have changed. By default, a new word only starts at whitespace, so that a 'word' is defined as a maximal sequence of non-whitespace characters. The optional argument can be used to configure this. It can also be set via a diff driver, see linkgit:gitattributes[1]; if a is given explicitly, it overrides any diff driver setting. + The must be an (extended) regular expression. When set, every non-overlapping match of the is considered a word. Anything between these matches is considered whitespace and ignored for the purposes of finding differences. You may want to append `|[^[:space:]]` to your regular expression to make sure that it matches all non-whitespace characters. A match that contains a newline is silently truncated at the newline. -- Thomas Rast trast@{inf,student}.ethz.ch