From: "\"Peter Valdemar Mørch (Lists)\"" <4ux6as402@sneakemail•com>
To: git@vger•kernel.org
Subject: [PATCH] Document disabling core.whitespace values trailing-space and space-before-tab
Date: Thu, 24 Jul 2008 07:34:06 +0200 [thread overview]
Message-ID: <4888144E.8090300@sneakemail.com> (raw)
[-- 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
next reply other threads:[~2008-07-24 5:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 5:34 "Peter Valdemar Mørch (Lists)" [this message]
2008-07-24 8:29 ` [PATCH] Document disabling core.whitespace values trailing-space and space-before-tab 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4888144E.8090300@sneakemail.com \
--to=4ux6as402@sneakemail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox