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

Re: [PATCH 1/2] War on whitespace: first, a bit of retreat.

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 2, 2007, 12:25 UTC
Message-ID
<fgf4qu$e8c$1@ger.gmane.org>
In-Reply-To
<ee77f5c20711020450hdfe064fsace9349fe6494ec9@mail.gmail.com>
David Symonds wrote:
Show 32 quoted lines
> 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
Previous: David SymondsNext: David Symonds
Message 8 of 12 in “War on whitespace: first, a bit of retreat.”
  1. 1/2 War on whitespace: first, a bit of retreat.Junio C Hamano, Nov 2, 2007
  2. 2/2 git-diff: complain about >=8 consecutive spaces in initial indentJunio C Hamano, Nov 2, 2007
  3. Josh TriplettNov 13, 2007
  4. Junio C HamanoNov 14, 2007
  5. David SymondsNov 2, 2007
  6. Andreas EricssonNov 2, 2007
  7. David SymondsNov 2, 2007
  8. Jakub NarebskiNov 2, 2007
  9. David SymondsNov 2, 2007
  10. David SymondsNov 2, 2007
  11. J. Bruce FieldsNov 2, 2007
  12. Junio C HamanoNov 3, 2007

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.