git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 11, 2008, 03:34 UTC
Message-ID
<7vk5lcb1zq.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0802101724170.13593@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 8 quoted lines
> On Sun, 10 Feb 2008, Junio C Hamano wrote:
> ...
>> 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
Previous: Daniel BarkalowNext: Brian Downing
Message 20 of 22 in “Add gitattributes file making whitespace checking pickier”
  1. Add gitattributes file making whitespace checking pickierJ. Bruce Fields, Feb 9, 2008
  2. Daniel BarkalowFeb 9, 2008
  3. J. Bruce FieldsFeb 9, 2008
  4. J. Bruce FieldsFeb 9, 2008
  5. Jakub NarebskiFeb 9, 2008
  6. J. Bruce FieldsFeb 9, 2008
  7. Jakub NarebskiFeb 9, 2008
  8. J. Bruce FieldsFeb 9, 2008
  9. Junio C HamanoFeb 9, 2008
  10. J. Bruce FieldsFeb 9, 2008
  11. Jakub NarebskiFeb 9, 2008
  12. Junio C HamanoFeb 10, 2008
  13. Jakub NarebskiFeb 10, 2008
  14. Junio C HamanoFeb 10, 2008
  15. Add gitattributes file making whitespace checking pickierJunio C Hamano, Feb 10, 2008
  16. J. Bruce FieldsFeb 10, 2008
  17. Daniel BarkalowFeb 10, 2008
  18. Junio C HamanoFeb 10, 2008
  19. Daniel BarkalowFeb 10, 2008
  20. Junio C HamanoFeb 11, 2008
  21. Brian DowningFeb 12, 2008
  22. Junio C HamanoFeb 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.