Skip to content

Commit

Permalink
Define the project whitespace policy
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
gitster committed Feb 11, 2008
1 parent 6fb5375 commit 14f9e12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* whitespace=!indent,trail,space
*.[ch] whitespace
1 change: 1 addition & 0 deletions Documentation/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.txt whitespace
1 change: 1 addition & 0 deletions t/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -whitespace

0 comments on commit 14f9e12

Please sign in to comment.