]> git.ipfire.org Git - thirdparty/git.git/commit
.gitattributes: remove misspelled no-op whitespace attribute
authorJunio C Hamano <gitster@pobox.com>
Tue, 11 Nov 2025 18:41:20 +0000 (10:41 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Nov 2025 18:53:37 +0000 (10:53 -0800)
commit358e94dc7059500af09435112ef1d4e5f7692e52
treeacf122b3787837d6a04625145d821c924cb41e9f
parent54a3711a9dd968a04249beef157393d64b579d64
.gitattributes: remove misspelled no-op whitespace attribute

Ever since 14f9e128 (Define the project whitespace policy,
2008-02-10) added the whitespace rules to .gitattributes, we spelled
the most general rule like so:

    * whitespace=!indent,trail,space

in the top-level .gitattributes file.  The intent of this line was
described in the commit log message:

     - Unless otherwise specified, indent with SP that could be
       replaced with HT are not "bad".  But SP before HT in the
       indent is "bad", and trailing whitespaces are "bad".

It clearly wanted to disable indent-with-non-tab, so !indent is most
likely a misspelt form of '-indent'.  Because indent-with-non-tab
has never been enabled by default, by luck this was not causing any
ill effect.

We could either remove "!indent", or spell it "-indent".  The
immediate effect would be the same.  It would only start to make a
difference when/if we enable indent-with-non-tab by default in
future versions of Git.

Let's take the former option to remove "!indent" from the list.  We
would feel the effect first-hand ourselves before anybody else if we
ever decide to change the built-in default whitespace rules, which
would be hidden from us if we decide to rewrite it to "-indent"
instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitattributes