Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Add gitattributes file making whitespace checking pickier

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:12
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Possibly related (same subject, not in this thread)

Daniel Barkalow [off-list ref] writes:
On Sun, 10 Feb 2008, Junio C Hamano wrote:
...
quoted
True, how about this instead?
That makes things more clear, although I'd still like a t/.gitattributes 
that meant that, regardless of the project's policies in general, t/ files 
may care about whitespace, so we don't have to worry about that in future 
changes to the top level .gitattributes.
Ok, that's sensible.

This is what I'll apply.  We can tighten and/or loosen per type
of the contents as we discover glitches.

--

 .gitattributes               |    2 ++
 Documentation/.gitattributes |    1 +
 t/.gitattributes             |    1 +
 3 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 .gitattributes
 create mode 100644 Documentation/.gitattributes
 create mode 100644 t/.gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6b9c715
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+* whitespace=!indent,trail,space
+*.[ch] whitespace
diff --git a/Documentation/.gitattributes b/Documentation/.gitattributes
new file mode 100644
index 0000000..ddb0301
--- /dev/null
+++ b/Documentation/.gitattributes
@@ -0,0 +1 @@
+*.txt whitespace
diff --git a/t/.gitattributes b/t/.gitattributes
new file mode 100644
index 0000000..562b12e
--- /dev/null
+++ b/t/.gitattributes
@@ -0,0 +1 @@
+* -whitespace
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help