diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-05-26 10:11:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-26 23:00:01 -0700 |
commit | b8767f791c15f119554c1466af60e4f2433ae971 (patch) | |
tree | 64c5787bb0f6490a074e10969ee820f7684f1db9 /Documentation/diff-options.txt | |
parent | 0e383e185ae57a8ee6ba015a43749f6d34fe3c9a (diff) | |
download | git-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 'Documentation/diff-options.txt')
-rw-r--r-- | Documentation/diff-options.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 6cb083aae5..85a6547774 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=<kind>:: + Highlight whitespace errors on lines specified by <kind> + in the color specified by `color.diff.whitespace`. <kind> + 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:: |