git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Document disabling core.whitespace values trailing-space and space-before-tab
@ 2008-07-24  5:34 "Peter Valdemar Mørch (Lists)"
  2008-07-24  8:29 ` Nanako Shiraishi
  2008-07-25  7:28 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: "Peter Valdemar Mørch (Lists)" @ 2008-07-24  5:34 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

 From http://article.gmane.org/gmane.comp.version-control.git/68146 I got
the syntax that works:

git config core.whitespace "-trailing-space"

Is it me, or is this not readable from git help config which says:

> 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:
> 
> ·   trailing-space treats trailing whitespaces at the end of the line
> as an error (enabled by default).

The '-trailing-space' syntax to disable the trailing-space setting is 
not obvious and not documented as far as I can see. I would have assumed 
a value of '' would disable it.

Is there a documentation bug here? If so, I suggest this patch. I didn't 
find anywhere else where the '-setting' syntax was used to disable 
something.

My first-ever git patch is attached, because Thunderbird messes up due 
to wrapping. I realize that SubmittingPatches has a mini-guide for 
reconfiguring Thunderbird (ver 1!), but I really prefer not to have to 
add extensions and reconfigure Thunderbird to send patches. (Comments to 
this and how the patch was made are welcome and encouraged)

Peter


-- 
Peter Valdemar Mørch
http://www.morch.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Document-disabling-core.whitespace-values-trailing-s.patch --]
[-- Type: text/x-patch; name="0001-Document-disabling-core.whitespace-values-trailing-s.patch", Size: 1424 bytes --]

>From 900455ce5a4e8bf771aea2e3dbdbab38e440cdf4 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Peter=20Valdemar=20M=C3=B8rch?= <peter@morch.com>
Date: Thu, 24 Jul 2008 07:18:48 +0200
Subject: [PATCH] Document disabling core.whitespace values trailing-space and space-before-tab
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit


Signed-off-by: Peter Valdemar Mørch <peter@morch.com>
---
 Documentation/config.txt |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e784805..a198b3c 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -361,10 +361,12 @@ core.whitespace::
 	consider them as errors:
 +
 * `trailing-space` treats trailing whitespaces at the end of the line
-  as an error (enabled by default).
+  as an error (enabled by default - disable with 'git config core.whitespace
+  "-trailing-space"').
 * `space-before-tab` treats a space character that appears immediately
   before a tab character in the initial indent part of the line as an
-  error (enabled by default).
+  error (enabled by default - disable with 'git config core.whitespace
+  "-space-before-tab"').
 * `indent-with-non-tab` treats a line that is indented with 8 or more
   space characters as an error (not enabled by default).
 * `cr-at-eol` treats a carriage-return at the end of line as
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-25  8:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24  5:34 [PATCH] Document disabling core.whitespace values trailing-space and space-before-tab "Peter Valdemar Mørch (Lists)"
2008-07-24  8:29 ` Nanako Shiraishi
2008-07-24  9:41   ` "Peter Valdemar Mørch (Lists)"
2008-07-25  4:44   ` Junio C Hamano
2008-07-25  6:11     ` Peter Valdemar Mørch
2008-07-25  6:13     ` "Peter Valdemar Mørch (Lists)"
2008-07-25  8:49     ` Junio C Hamano
2008-07-25  7:28 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).