summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-26 10:11:28 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-26 23:00:01 -0700
commitb8767f791c15f119554c1466af60e4f2433ae971 (patch)
tree64c5787bb0f6490a074e10969ee820f7684f1db9 /diff.h
parent0e383e185ae57a8ee6ba015a43749f6d34fe3c9a (diff)
downloadgit-b8767f791c15f119554c1466af60e4f2433ae971.tar.gz
diff.c: --ws-error-highlight=<kind> option
Traditionally, we only cared about whitespace breakages introduced in new lines. Some people want to paint whitespace breakages on old lines, too. When they see a whitespace breakage on a new line, they can spot the same kind of whitespace breakage on the corresponding old line and want to say "Ah, those breakages are there but they were inherited from the original, so let's not touch them for now." Introduce `--ws-error-highlight=<kind>` option, that lets them pass a comma separated list of `old`, `new`, and `context` to specify what lines to highlight whitespace errors on. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index b4a624d235..90c7cd61f5 100644
--- a/diff.h
+++ b/diff.h
@@ -137,6 +137,11 @@ struct diff_options {
int dirstat_permille;
int setup;
int abbrev;
+/* white-space error highlighting */
+#define WSEH_NEW 1
+#define WSEH_CONTEXT 2
+#define WSEH_OLD 4
+ unsigned ws_error_highlight;
const char *prefix;
int prefix_length;
const char *stat_sep;