Re: [PATCH v4 0/7] customizable --color-words

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 19 Jan 2009, Santi Béjar wrote:

> 2009/1/17 Thomas Rast <trast@xxxxxxxxxxxxxxx>:
> > 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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux