Add the --color-words option to the diff options family

With this option, the changed words are shown inline. For example,
if a file containing "This is foo" is changed to "This is bar", the diff
will now show "This is " in plain text, "foo" in red, and "bar" in green.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Johannes Schindelin
2006-07-28 23:56:15 +02:00
committed by Junio C Hamano
parent 65cdb5f165
commit f59a59e22f
3 changed files with 177 additions and 7 deletions

3
diff.h
View File

@ -46,7 +46,8 @@ struct diff_options {
full_index:1,
silent_on_remove:1,
find_copies_harder:1,
color_diff:1;
color_diff:1,
color_diff_words:1;
int context;
int break_opt;
int detect_rename;