doc: add missing "none" value for diff.wsErrorHighlight
PATCH 1/1 doc: add missing "none" value for diff.wsErrorHighlight
The value has not eluded documentation so far.
--- Documentation/diff-config.txt | 2 +- Documentation/diff-options.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/diff-config.txt +1 -1
@@ -200,7 +200,7 @@ diff.algorithm:: + diff.wsErrorHighlight:: - A comma separated list of `old`, `new`, `context`, that + A comma separated list of `old`, `new`, `context` and `none`, that specifies how whitespace errors on lines are highlighted with `color.diff.whitespace`. Can be overridden by the command line option `--ws-error-highlight=<kind>`
Documentation/diff-options.txt +1 -1
@@ -302,7 +302,7 @@ ifndef::git-format-patch[] --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 + is a comma separated list of `old`, `new`, `context` and `none`. 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.
Signature · 1 line
2.13.3
Quoted 1 line · Andreas Heiduk
The value has not eluded documentation so far.
I am not sure what "has not eluded" means in this context (did you mean "has eluded"?).
The patch text itself is not wrong per-se, but if we are to add documentation for 'none', diff-options.txt must also document that it clears the default and previously given values, unlike new, old and context that are cumulative. For that matter, we do not list 'default' and 'all' (which also clears the previous ones before setting their own) in that three-item list, either.
I think we need to either
- make it to a six-item list and then describe that 'none', 'all' and 'default' clear the slate before taking any effect, or
- keep it three-item list of cumulative things, and then in the sentence that talks about all in Documentation/diff-options.txt to also explain what 'default' and 'none' do.
Thanks.
Quoted 32 lines
Signed-off-by Andreas Heiduk <[email protected]>--- Documentation/diff-config.txt | 2 +- Documentation/diff-options.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Documentation/diff-config.txt +1
-1@@ -200,7 +200,7 @@ diff.algorithm:: + diff.wsErrorHighlight:: - A comma separated list of `old`, `new`, `context`, that + A comma separated list of `old`, `new`, `context` and `none`, that specifies how whitespace errors on lines are highlighted with `color.diff.whitespace`. Can be overridden by the command line option `--ws-error-highlight=<kind>`Documentation/diff-options.txt +1
-1@@ -302,7 +302,7 @@ ifndef::git-format-patch[] --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 + is a comma separated list of `old`, `new`, `context` and `none`. 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.
PATCH v2 1/1 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.
--- Documentation/diff-config.txt | 11 +++++++---- Documentation/diff-options.txt | 17 ++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-)
Documentation/diff-config.txt +7 -4
@@ -200,7 +200,10 @@ diff.algorithm:: + diff.wsErrorHighlight:: - A comma separated list of `old`, `new`, `context`, that - specifies how whitespace errors on lines are highlighted - with `color.diff.whitespace`. Can be overridden by the - command line option `--ws-error-highlight=<kind>` + Highlight whitespace errors in the `context`, `old` or `new` + lines of the diff. Multiple values are separated by comma, + `none` resets previous values, `default` reset the list to + `new` and `all` is a shorthand for `old,new,context`. The + whitespace errors are colored with `color.diff.whitespace`. + The command line option `--ws-error-highlight=<kind>` + overrides this setting.
Documentation/diff-options.txt +8 -9
@@ -300,15 +300,14 @@ ifndef::git-format-patch[] 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`. - The `diff.wsErrorHighlight` configuration variable can be - used to specify the default behaviour. + Highlight whitespace errors in the `context`, `old` or `new` + lines of the diff. Multiple values are separated by comma, + `none` resets previous values, `default` reset the list to + `new` and `all` is a shorthand for `old,new,context`. When + this option is not given, and the configuration variable + `diff.wsErrorHighlight` is not set, only whitespace errors in + `new` lines are highlighted. The whitespace errors are colored + whith `color.diff.whitespace`. endif::git-format-patch[]
Signature · 1 line
2.13.3
Re: [PATCH v2] doc: add missing values "none" and "default" for diff.wsErrorHighlight
Quoted 8 lines · Andreas Heiduk
The values have eluded documentation so far. While at it streamline the wording by grouping relevant parts together.
Signed-off-by Andreas Heiduk <[email protected]>--- Documentation/diff-config.txt | 11 +++++++---- Documentation/diff-options.txt | 17 ++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-)
Looks sensible; thanks. Will queue.