From: Junio C Hamano Date: Sun, 11 Jan 2009 01:34:44 GMT Subject: Re: [PATCH v2] make diff --color-words customizable Message-ID: <7vr63atykr.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: > Well, the thing I tried to hint at: it is not good to have a monster > patch, as nobody will review it. > > In your case, I imagine it would be much easier to get reviewers if you > had > > patch 1/4 refactor color-words to allow for 0-character word > boundaries > patch 2/4 allow regular expressions to define what makes a word > patch 3/4 add option to specify word boundary regexps via > attributes > patch 4/4 test word boundary regexps > > And I admit that I documented the code lousily, but that does not mean > that you should repeat that mistake. Sounds like a reasonable request. Also I am seeing: diff.c: In function 'scan_word_boundaries': diff.c:512: warning: enumeration value 'DIFF_WORD_UNDEF' not handled in switch from this part of the code: for (i = 0; i < len; i++) { switch (buf->boundaries[i]) { case DIFF_WORD_BODY: *p++ = text[i]; break; case DIFF_WORD_END: *p++ = text[i]; *p++ = '\n'; /* insert an artificial newline */ break; case DIFF_WORD_SPACE: *p++ = '\n'; break; case DIFF_WORD_SKIP: /* nothing */ break; } }