git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 1/2] War on whitespace: first, a bit of retreat.
Date: Fri, 02 Nov 2007 13:25:32 +0100	[thread overview]
Message-ID: <fgf4qu$e8c$1@ger.gmane.org> (raw)
In-Reply-To: ee77f5c20711020450hdfe064fsace9349fe6494ec9@mail.gmail.com

David Symonds wrote:
> On 11/2/07, Andreas Ericsson <ae@op5.se> wrote:
>> David Symonds wrote:
>>> On 11/2/07, Junio C Hamano <gitster@pobox.com> wrote:
>>>> This introduces core.whitespace configuration variable that lets
>>>> you specify the definition of "whitespace error".
>>>>
>>>> Currently there are two kinds of whitespace errors defined:
>>>>
>>>>  * trailing-space: trailing whitespaces at the end of the line.
>>>>
>>>>  * space-before-tab: a SP appears immediately before HT in the
>>>>    indent part of the line.
>>>
>>>>         [core]
>>>>                 whitespace = -trailing-space
>>>
>>> Could I suggest naming the option 'whitespaceError', so it's clearer
>>> that it's a negative setting?
>>
>> Which would also open the window for "WhitespaceWarning" and "WhitespaceAutofix"
>> later on, using the same semantics.
> 
> Maybe cut straight to the chase:
> 
> [core]
>         whitespace.trailing = error
>         whitespace.space-before-tab = error
>         whitespace.8-spaces = warn
> 
> There'd be at least "error", "warn"; "okay" and "autofix" would be
> other sensible values. I'm willing to help code this up if this sounds
> good.

Nice idea, but the syntax is

[core "whitespace"]
        trailing = error
        space-before-tab = error
        indent-with-space = warn

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

  reply	other threads:[~2007-11-02 12:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02  7:34 [PATCH 1/2] War on whitespace: first, a bit of retreat Junio C Hamano
2007-11-02  7:38 ` [PATCH 2/2] git-diff: complain about >=8 consecutive spaces in initial indent Junio C Hamano
2007-11-13 23:37   ` Josh Triplett
2007-11-14  0:46     ` Junio C Hamano
2007-11-02 10:14 ` [PATCH 1/2] War on whitespace: first, a bit of retreat David Symonds
2007-11-02 10:45   ` Andreas Ericsson
2007-11-02 11:50     ` David Symonds
2007-11-02 12:25       ` Jakub Narebski [this message]
2007-11-02 12:53         ` David Symonds
2007-11-02 13:26           ` David Symonds
2007-11-02 17:45 ` J. Bruce Fields
2007-11-03  2:45   ` 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='fgf4qu$e8c$1@ger.gmane.org' \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).