color-words: take an optional regular expression describing words
commita5eaafb534329c7df9d724ac1938c64145621a9c
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 9 Jan 2009 11:50:30 +0000 (9 12:50 +0100)
committerThomas Rast <trast@student.ethz.ch>
Sat, 17 Jan 2009 16:13:44 +0000 (17 17:13 +0100)
tree4df3736327171e316bf837eed9ebe14af746180a
parent5e39efa71be7898f940328de231f20eea537842a
color-words: take an optional regular expression describing words

In some applications, words are not delimited by white space.  To
allow for that, you can specify a regular expression describing
what makes a word with

git diff --color-words='[A-Za-z0-9]+'

Note that words cannot contain newline characters.

As suggested by Thomas Rast, the words are the exact matches of the
regular expression.

Note that a regular expression beginning with a '^' will match only
a word at the beginning of the hunk, not a word at the beginning of
a line, and is probably not what you want.

This commit contains a quoting fix by Thomas Rast.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Documentation/diff-options.txt
diff.c
diff.h
t/t4034-diff-words.sh