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

Re: [PATCH] Document disabling core.whitespace values trailing-space and space-before-tab

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 25, 2008, 08:49 UTC
Message-ID
<7v3alyuz4o.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vbq0m608w.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Various "values" given to the whitespace attribute actually act as if they
> are sub-variables and obey the similar "[-]name" rule, but (1) that is
> left unsaid, and (2) in that context '!' does not make sense so only '-'
> has any meaning.

Actually I take it back. "!name to revert to unspecified and -name to unset" really is about name; values to whitespace do not work like "sub-variables" at all.

> So I think Peter's patch is going in the right direction.
I've committed a much more simplified version.

-- >8 -- [PATCH] Documentation: clarify how to diable elements in core.whitespace

Noticed by Peter Valdemar Mørch.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/Documentation/config.txt b/Documentation/config.txt
index e784805..798b551 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -358,7 +358,8 @@ core.whitespace::
 	A comma separated list of common whitespace problems to
 	notice.  'git-diff' will use `color.diff.whitespace` to
 	highlight them, and 'git-apply --whitespace=error' will
-	consider them as errors:
+	consider them as errors.  You can prefix `-` to disable
+	any of them (e.g. `-trailing-space`):
 +
 * `trailing-space` treats trailing whitespaces at the end of the line
   as an error (enabled by default).
Previous: Peter Valdemar Mørch (Lists)Next: Junio C Hamano
Message 7 of 8 in “Document disabling core.whitespace values trailing-space and space-before-tab”
  1. Document disabling core.whitespace values trailing-space and space-before-tabPeter Valdemar Mørch (Lists), Jul 24, 2008
  2. Nanako ShiraishiJul 24, 2008
  3. Peter Valdemar Mørch (Lists)Jul 24, 2008
  4. Junio C HamanoJul 25, 2008
  5. Peter Valdemar MørchJul 25, 2008
  6. Peter Valdemar Mørch (Lists)Jul 25, 2008
  7. Junio C HamanoJul 25, 2008
  8. Junio C HamanoJul 25, 2008

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.