doc: add missing values "none" and "default" for diff.wsErrorHighlight
The values have eluded documentation so far. While at it streamline the wording by grouping relevant parts together. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Andreas Heiduk committed
Jul 25, 2017 at 22:53 UTC
c0bb6d9cef66d132ba33ff4a62eda3a7038b75d0
2 files changed
+15
-13
Documentation/diff-config.txt
+7
-4
@@ -200,7 +200,10 @@ diff.algorithm::
200
+
201
202
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
+8
-9
@@ -301,15 +301,14 @@ ifndef::git-format-patch[]
301
with --exit-code.
302
303
--ws-error-highlight=<kind>::
304
- Highlight whitespace errors on lines specified by <kind>
305
- in the color specified by `color.diff.whitespace`. <kind>
306
- is a comma separated list of `old`, `new`, `context`. When
307
- this option is not given, only whitespace errors in `new`
308
- lines are highlighted. E.g. `--ws-error-highlight=new,old`
309
- highlights whitespace errors on both deleted and added lines.
310
- `all` can be used as a short-hand for `old,new,context`.
311
- The `diff.wsErrorHighlight` configuration variable can be
312
- used to specify the default behaviour.
304
+ Highlight whitespace errors in the `context`, `old` or `new`
305
+ lines of the diff. Multiple values are separated by comma,
306
+ `none` resets previous values, `default` reset the list to
307
+ `new` and `all` is a shorthand for `old,new,context`. When
308
+ this option is not given, and the configuration variable
309
+ `diff.wsErrorHighlight` is not set, only whitespace errors in
310
+ `new` lines are highlighted. The whitespace errors are colored
311
+ whith `color.diff.whitespace`.
312
313
endif::git-format-patch[]
314