git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] doc: add missing values "none" and "default" for diff.wsErrorHighlight

From
Andreas Heiduk <asheiduk@gmail.com>
Date
Jul 25, 2017, 20:53 UTC
Message-ID
<20170725205315.12030-1-asheiduk@gmail.com>
In-Reply-To
<xmqqa83sbamf.fsf@gitster.mtv.corp.google.com>

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>
---
 Documentation/diff-config.txt  | 11 +++++++----
 Documentation/diff-options.txt | 17 ++++++++---------
 2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index cbce8ec63..5ca942ab5 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -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.
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 89cc0f48d..d60f61ad4 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -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[]
 
-- 
2.13.3
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “doc: add missing "none" value for diff.wsErrorHighlight”
  1. doc: add missing "none" value for diff.wsErrorHighlightAndreas Heiduk, Jul 24, 2017
  2. Junio C HamanoJul 25, 2017
  3. doc: add missing values "none" and "default" for diff.wsErrorHighlightAndreas Heiduk, Jul 25, 2017
  4. Junio C HamanoJul 25, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.