From 882749a04f828fccd795deec4d0bf10ba09ae549 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Wed, 14 Apr 2010 17:59:06 +0200 Subject: diff: add --word-diff option that generalizes --color-words This teaches the --color-words engine a more general interface that supports two new modes: * --word-diff=plain, inspired by the 'wdiff' utility (most similar to 'wdiff -n '): uses delimiters [-removed-] and {+added+} * --word-diff=porcelain, which generates an ad-hoc machine readable format: - each diff unit is prefixed by [-+ ] and terminated by newline as in unified diff - newlines in the input are output as a line consisting only of a tilde '~' Both of these formats still support color if it is enabled, using it to highlight the differences. --color-words becomes a synonym for --word-diff=color, which is the color-only format. Also adds some compatibility/convenience options. Thanks to Junio C Hamano and Miles Bader for good ideas. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- color.h | 1 - 1 file changed, 1 deletion(-) (limited to 'color.h') diff --git a/color.h b/color.h index 5c264b0ce3..03ca064748 100644 --- a/color.h +++ b/color.h @@ -61,6 +61,5 @@ __attribute__((format (printf, 3, 4))) int color_fprintf(FILE *fp, const char *color, const char *fmt, ...); __attribute__((format (printf, 3, 4))) int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...); -int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf); #endif /* COLOR_H */ -- cgit v1.2.1