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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>From 900455ce5a4e8bf771aea2e3dbdbab38e440cdf4 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Peter=20Valdemar=20M=C3=B8rch?= <peter@xxxxxxxxx>
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@xxxxxxxxx>
---
 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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux