summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fb5375)
raw | patch | inline | side by side (parent: 6fb5375)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 03:34:34 +0000 (19:34 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 21:23:15 +0000 (13:23 -0800) |
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>
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>
.gitattributes | [new file with mode: 0644] | patch | blob |
Documentation/.gitattributes | [new file with mode: 0644] | patch | blob |
t/.gitattributes | [new file with mode: 0644] | patch | blob |
diff --git a/.gitattributes b/.gitattributes
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+* whitespace=!indent,trail,space
+*.[ch] whitespace
diff --git a/Documentation/.gitattributes b/Documentation/.gitattributes
--- /dev/null
@@ -0,0 +1 @@
+*.txt whitespace
diff --git a/t/.gitattributes b/t/.gitattributes
--- /dev/null
+++ b/t/.gitattributes
@@ -0,0 +1 @@
+* -whitespace