{"thread":{"id":"46458","subject":"[PATCH] doc: add missing \"none\" value for diff.wsErrorHighlight","startedAt":"2017-07-24T22:30:54Z","lastAt":"2017-07-25T21:31:14Z","messageCount":4,"participants":["Andreas Heiduk","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"325013","messageId":"20170724223021.9124-1-asheiduk@gmail.com","threadId":"46458","inReplyTo":null,"subject":"[PATCH] doc: add missing \"none\" value for diff.wsErrorHighlight","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-07-24T22:30:21Z","receivedAt":"2017-07-24T22:30:54Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"The value has not eluded documentation so far.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/diff-config.txt  | 2 +-\n Documentation/diff-options.txt | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt\nindex cbce8ec63..c84ced8f6 100644\n--- a/Documentation/diff-config.txt\n+++ b/Documentation/diff-config.txt\n@@ -200,7 +200,7 @@ diff.algorithm::\n +\n \n diff.wsErrorHighlight::\n-\tA comma separated list of `old`, `new`, `context`, that\n+\tA comma separated list of `old`, `new`, `context` and `none`, that\n \tspecifies how whitespace errors on lines are highlighted\n \twith `color.diff.whitespace`.  Can be overridden by the\n \tcommand line option `--ws-error-highlight=<kind>`\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 89cc0f48d..903d68eb7 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -302,7 +302,7 @@ ifndef::git-format-patch[]\n --ws-error-highlight=<kind>::\n \tHighlight whitespace errors on lines specified by <kind>\n \tin the color specified by `color.diff.whitespace`.  <kind>\n-\tis a comma separated list of `old`, `new`, `context`.  When\n+\tis a comma separated list of `old`, `new`, `context` and `none`.  When\n \tthis option is not given, only whitespace errors in `new`\n \tlines are highlighted.  E.g. `--ws-error-highlight=new,old`\n \thighlights whitespace errors on both deleted and added lines.\n-- \n2.13.3\n\n"},{"id":"325056","messageId":"xmqqa83sbamf.fsf@gitster.mtv.corp.google.com","threadId":"46458","inReplyTo":"20170724223021.9124-1-asheiduk@gmail.com","subject":"Re: [PATCH] doc: add missing \"none\" value for diff.wsErrorHighlight","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-07-25T19:05:28Z","receivedAt":"2017-07-25T19:05:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> The value has not eluded documentation so far.\n\nI am not sure what \"has not eluded\" means in this context (did you\nmean \"has eluded\"?).  \n\nThe patch text itself is not wrong per-se, but if we are to add\ndocumentation for 'none', diff-options.txt must also document that\nit clears the default and previously given values, unlike new, old\nand context that are cumulative.  For that matter, we do not list\n'default' and 'all' (which also clears the previous ones before\nsetting their own) in that three-item list, either.\n\nI think we need to either \n\n - make it to a six-item list and then describe that 'none', 'all'\n   and 'default' clear the slate before taking any effect, or \n\n - keep it three-item list of cumulative things, and then in the\n   sentence that talks about `all` in Documentation/diff-options.txt\n   to also explain what 'default' and 'none' do.\n\nThanks.\n\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>  Documentation/diff-config.txt  | 2 +-\n>  Documentation/diff-options.txt | 2 +-\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt\n> index cbce8ec63..c84ced8f6 100644\n> --- a/Documentation/diff-config.txt\n> +++ b/Documentation/diff-config.txt\n> @@ -200,7 +200,7 @@ diff.algorithm::\n>  +\n>  \n>  diff.wsErrorHighlight::\n> -\tA comma separated list of `old`, `new`, `context`, that\n> +\tA comma separated list of `old`, `new`, `context` and `none`, that\n>  \tspecifies how whitespace errors on lines are highlighted\n>  \twith `color.diff.whitespace`.  Can be overridden by the\n>  \tcommand line option `--ws-error-highlight=<kind>`\n> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\n> index 89cc0f48d..903d68eb7 100644\n> --- a/Documentation/diff-options.txt\n> +++ b/Documentation/diff-options.txt\n> @@ -302,7 +302,7 @@ ifndef::git-format-patch[]\n>  --ws-error-highlight=<kind>::\n>  \tHighlight whitespace errors on lines specified by <kind>\n>  \tin the color specified by `color.diff.whitespace`.  <kind>\n> -\tis a comma separated list of `old`, `new`, `context`.  When\n> +\tis a comma separated list of `old`, `new`, `context` and `none`.  When\n>  \tthis option is not given, only whitespace errors in `new`\n>  \tlines are highlighted.  E.g. `--ws-error-highlight=new,old`\n>  \thighlights whitespace errors on both deleted and added lines.\n"},{"id":"325072","messageId":"20170725205315.12030-1-asheiduk@gmail.com","threadId":"46458","inReplyTo":"xmqqa83sbamf.fsf@gitster.mtv.corp.google.com","subject":"[PATCH v2] doc: add missing values \"none\" and \"default\" for diff.wsErrorHighlight","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-07-25T20:53:15Z","receivedAt":"2017-07-25T20:53:58Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"The values have eluded documentation so far. While at it streamline\nthe wording by grouping relevant parts together.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/diff-config.txt  | 11 +++++++----\n Documentation/diff-options.txt | 17 ++++++++---------\n 2 files changed, 15 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt\nindex cbce8ec63..5ca942ab5 100644\n--- a/Documentation/diff-config.txt\n+++ b/Documentation/diff-config.txt\n@@ -200,7 +200,10 @@ diff.algorithm::\n +\n \n diff.wsErrorHighlight::\n-\tA comma separated list of `old`, `new`, `context`, that\n-\tspecifies how whitespace errors on lines are highlighted\n-\twith `color.diff.whitespace`.  Can be overridden by the\n-\tcommand line option `--ws-error-highlight=<kind>`\n+\tHighlight whitespace errors in the `context`, `old` or `new`\n+\tlines of the diff.  Multiple values are separated by comma,\n+\t`none` resets previous values, `default` reset the list to\n+\t`new` and `all` is a shorthand for `old,new,context`.  The\n+\twhitespace errors are colored with `color.diff.whitespace`.\n+\tThe command line option `--ws-error-highlight=<kind>`\n+\toverrides this setting.\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 89cc0f48d..d60f61ad4 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -300,15 +300,14 @@ ifndef::git-format-patch[]\n \twith --exit-code.\n \n --ws-error-highlight=<kind>::\n-\tHighlight whitespace errors on lines specified by <kind>\n-\tin the color specified by `color.diff.whitespace`.  <kind>\n-\tis a comma separated list of `old`, `new`, `context`.  When\n-\tthis option is not given, only whitespace errors in `new`\n-\tlines are highlighted.  E.g. `--ws-error-highlight=new,old`\n-\thighlights whitespace errors on both deleted and added lines.\n-\t`all` can be used as a short-hand for `old,new,context`.\n-\tThe `diff.wsErrorHighlight` configuration variable can be\n-\tused to specify the default behaviour.\n+\tHighlight whitespace errors in the `context`, `old` or `new`\n+\tlines of the diff.  Multiple values are separated by comma,\n+\t`none` resets previous values, `default` reset the list to\n+\t`new` and `all` is a shorthand for `old,new,context`.  When\n+\tthis option is not given, and the configuration variable\n+\t`diff.wsErrorHighlight` is not set, only whitespace errors in\n+\t`new` lines are highlighted. The whitespace errors are colored\n+\twhith `color.diff.whitespace`.\n \n endif::git-format-patch[]\n \n-- \n2.13.3\n\n"},{"id":"325078","messageId":"xmqqo9s8td9l.fsf@gitster.mtv.corp.google.com","threadId":"46458","inReplyTo":"20170725205315.12030-1-asheiduk@gmail.com","subject":"Re: [PATCH v2] doc: add missing values \"none\" and \"default\" for diff.wsErrorHighlight","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-07-25T21:31:02Z","receivedAt":"2017-07-25T21:31:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> The values have eluded documentation so far. While at it streamline\n> the wording by grouping relevant parts together.\n>\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>  Documentation/diff-config.txt  | 11 +++++++----\n>  Documentation/diff-options.txt | 17 ++++++++---------\n>  2 files changed, 15 insertions(+), 13 deletions(-)\n\nLooks sensible; thanks.  Will queue.\n"}]}