Skip to content

Commit 4c244c2

Browse files
committed
Merge branch 'ah/doc-wserrorhighlight'
Doc update. * ah/doc-wserrorhighlight: doc: add missing values "none" and "default" for diff.wsErrorHighlight
2 parents afb456a + c0bb6d9 commit 4c244c2

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

Documentation/diff-config.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ diff.algorithm::
200200
+
201201

202202
diff.wsErrorHighlight::
203-
A comma separated list of `old`, `new`, `context`, that
204-
specifies how whitespace errors on lines are highlighted
205-
with `color.diff.whitespace`. Can be overridden by the
206-
command line option `--ws-error-highlight=<kind>`
203+
Highlight whitespace errors in the `context`, `old` or `new`
204+
lines of the diff. Multiple values are separated by comma,
205+
`none` resets previous values, `default` reset the list to
206+
`new` and `all` is a shorthand for `old,new,context`. The
207+
whitespace errors are colored with `color.diff.whitespace`.
208+
The command line option `--ws-error-highlight=<kind>`
209+
overrides this setting.

Documentation/diff-options.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,14 @@ ifndef::git-format-patch[]
300300
with --exit-code.
301301

302302
--ws-error-highlight=<kind>::
303-
Highlight whitespace errors on lines specified by <kind>
304-
in the color specified by `color.diff.whitespace`. <kind>
305-
is a comma separated list of `old`, `new`, `context`. When
306-
this option is not given, only whitespace errors in `new`
307-
lines are highlighted. E.g. `--ws-error-highlight=new,old`
308-
highlights whitespace errors on both deleted and added lines.
309-
`all` can be used as a short-hand for `old,new,context`.
310-
The `diff.wsErrorHighlight` configuration variable can be
311-
used to specify the default behaviour.
303+
Highlight whitespace errors in the `context`, `old` or `new`
304+
lines of the diff. Multiple values are separated by comma,
305+
`none` resets previous values, `default` reset the list to
306+
`new` and `all` is a shorthand for `old,new,context`. When
307+
this option is not given, and the configuration variable
308+
`diff.wsErrorHighlight` is not set, only whitespace errors in
309+
`new` lines are highlighted. The whitespace errors are colored
310+
whith `color.diff.whitespace`.
312311

313312
endif::git-format-patch[]
314313

0 commit comments

Comments
 (0)