color-words: make regex configurable via attributesmaster
commitbd3efcbea6b98a6d592bd94f97170ed3d51eed4f
authorThomas Rast <trast@student.ethz.ch>
Sat, 10 Jan 2009 12:24:14 +0000 (10 13:24 +0100)
committerThomas Rast <trast@student.ethz.ch>
Sat, 17 Jan 2009 16:14:32 +0000 (17 17:14 +0100)
tree6c3d367a90e52c376bf52d76c57a496906efde30
parenteec280fa77c98a4f2982bde94246edeb910cffb5
color-words: make regex configurable via attributes

Make the --color-words splitting regular expression configurable via
the diff driver's 'wordregex' attribute.  The user can then set the
driver on a file in .gitattributes.  If a regex is given on the
command line, it overrides the driver's setting.

We also provide built-in regexes for the languages that already had
funcname patterns, and add an appropriate diff driver entry for C/++.
(The patterns are designed to run UTF-8 sequences into a single chunk
to make sure they remain readable.)

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Documentation/diff-options.txt
Documentation/gitattributes.txt
diff.c
t/t4034-diff-words.sh
userdiff.c
userdiff.h