From b8767f791c15f119554c1466af60e4f2433ae971 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 26 May 2015 10:11:28 -0700 Subject: diff.c: --ws-error-highlight= 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=` 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 --- Documentation/diff-options.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Documentation') diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 6cb083aae..85a654777 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -278,6 +278,16 @@ ifndef::git-format-patch[] initial indent of the line are considered whitespace errors. Exits with non-zero status if problems are found. Not compatible with --exit-code. + +--ws-error-highlight=:: + Highlight whitespace errors on lines specified by + in the color specified by `color.diff.whitespace`. + is a comma separated list of `old`, `new`, `context`. When + this option is not given, only whitespace errors in `new` + lines are highlighted. E.g. `--ws-error-highlight=new,old` + highlights whitespace errors on both deleted and added lines. + `all` can be used as a short-hand for `old,new,context`. + endif::git-format-patch[] --full-index:: -- cgit v1.2.1