Re: [PATCH v4 0/7] customizable --color-words
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 19, 2009, 23:35 UTC
- Message-ID
- <alpine.DEB.1.00.0901200031350.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <adf1fd3d0901191447n7fc39dect9cf5afd88a02015b@mail.gmail.com>
Hi,
On Mon, 19 Jan 2009, Santi Béjar wrote:
Show 16 quoted lines
> 2009/1/17 Thomas Rast <trast@student.ethz.ch>: > > Johannes Schindelin (4): > > Add color_fwrite_lines(), a function coloring each line individually > > color-words: refactor word splitting and use ALLOC_GROW() > > color-words: change algorithm to allow for 0-character word > > boundaries > > color-words: take an optional regular expression describing words > > > > Thomas Rast (3): > > color-words: enable REG_NEWLINE to help user > > color-words: expand docs with precise semantics > > color-words: make regex configurable via attributes > > > > Also, having a config (diff.color-words?) to set the default regexp > would be great. Thanks.
>From "git log --author==Santi --stat" it seems that you are quite capable
of providing that patch.
A few pointers:
- Add a global variable to diff.c, maybe "char *diff_word_regex". (Maybe it should be static instead, as it will be used in diff.c only.)
- Add code to set it in diff.c, function git_diff_ui_config().
- In diff.c, where "--color-words" is handled (without "="), add
if (diff_words_regex) options->word_regex = diff_word_regex;
- Add a test to t4034 that tests that the config sets a default, and that the command line can override it.
- Send to this list :-)
Ciao, Dscho