Thread (10 messages) 10 messages, 3 authors, 2016-06-15
STALE3758d

[PATCH 0/4] refactor the --color-words to make it more hackable

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:55

So the total change is pretty large, I have to admit.

But at least _I_ think it is easy to follow, and it actually makes the code
more readable/hackable.  Correct me if I'm wrong.

The basic idea is to decouple the original text from the text that is
passed to libxdiff to find the word differences.

To that end, the words of the pre and post texts are put into two lists that
are fed to libxdiff.  While the words are extracted, an array is created which
contains pointers back to the word boundaries in the original text.

To make the transition as easy to understand as possible, the code is first
refactored without actually changing what makes a word boundary.

Johannes Schindelin (4):
  Add color_fwrite(), a function coloring each line individually
  color-words: refactor word splitting and use ALLOC_GROW()
  color-words: refactor to allow for 0-character word boundaries
  color-words: take an optional regular expression describing words

 color.c |   24 ++++++++
 color.h |    1 +
 diff.c  |  185 +++++++++++++++++++++++++++++++++++++++------------------------
 diff.h  |    1 +
 4 files changed, 141 insertions(+), 70 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help