From: Ping Yin Date: Sat, 03 May 2008 11:57:03 GMT Subject: [PATCH v2 0/5] Make boundary characters for --color-words configurable Message-ID: <1209815828-6548-1-git-send-email-pkufranky@gmail.com> In-Reply-To: <46dff0320805020726y2592732cj9aef0111e5b2288a@mail.gmail.com> Ping Yin (5): diff.c: Remove code redundancy in diff_words_show diff.c: Use show variable name in fn_out_diff_words_aux diff.c: Fix --color-words showing trailing deleted words at another line Make boundary characters for --color-words configurable fn_out_diff_words_aux: Handle common diff line more carefully Documentation/config.txt | 4 ++ Documentation/diff-options.txt | 1 + diff.c | 83 +++++++++++++++++++++++++++------------- 3 files changed, 61 insertions(+), 27 deletions(-) The first two patches are just code refactor The 3rd patch fixes following problem 2 The 4th patch introduces diff.nonwordchars The 5th patch fixes following problem 1 > Oh, there are some problems, assuming "{}" are set as diff.nonwordchars > > 1. Trailing boundary character lost, for example > ---------------------------- > $ git diff- > - foo{ > + foo > $ git diff --color-words > foo > ---------------------------- > With --color-words, i can't know the trailing '{' is removed. This > problem exists even without my patch. In that case, only trainling > spaces are lost. > > 2. Trailing removed words shows at new line instead of the same line > ---------------------------- > $ git diff > - foo bar > + foo > (note: no space after foo) > $ git diff --color-words > foo > bar > -------------------------------- > bar should show in the same line with bar. This is not related to my patch.