mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
Define the project whitespace policy
This establishes what the "bad" whitespaces are for this project. The rules are: - 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". - For C source files, initial indent by SP that can be replaced with HT is also "bad". - Test scripts in t/ and test vectors in its subdirectories can contain anything, so we make it unrestricted for now. Anything "bad" will be shown in WHITESPACE error indicator in diff output, and "apply --whitespace=warn" will warn about it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6fb5375ede
commit
14f9e128d3
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
* whitespace=!indent,trail,space
|
||||
*.[ch] whitespace
|
1
Documentation/.gitattributes
vendored
Normal file
1
Documentation/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.txt whitespace
|
1
t/.gitattributes
vendored
Normal file
1
t/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* -whitespace
|
Loading…
Reference in New Issue
Block a user