Re: [PATCH] Add gitattributes file making whitespace checking pickier
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 10, 2008, 21:47 UTC
- Message-ID
- <7v8x1sfprd.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LNX.1.00.0802101502320.13593@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 11 quoted lines
> On Sun, 10 Feb 2008, Junio C Hamano wrote: > >> I've tried "unexpand | expand" to Documentation/*.txt and >> compared the formatted documentation before and after the >> change, and as we suspected everything seems to match. >> >> So I am considering applying this patch. We may want to tighten >> it later but as the initial set of rules this should do. > > I think it's worthwhile to note that some of the files under t/ have > whitespace that doesn't conform to the rest of the project.
Yes. I tried to be careful with the set of attribute files I sent out not to corrupt them. Was I unsuccessful?
> On the other hand, I think this patch is an odd combination of stuff; > aren't the contrib exceptions not exceptional, since only *.[ch] and *.txt > gets declared as "whitespace"?
True, how about this instead?
--- .gitattributes | 2 ++ Documentation/.gitattributes | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
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