Re: [PATCH] Add gitattributes file making whitespace checking pickier
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Feb 10, 2008, 22:34 UTC
- Message-ID
- <alpine.LNX.1.00.0802101724170.13593@iabervon.org>
- In-Reply-To
- <7v8x1sfprd.fsf@gitster.siamese.dyndns.org>
On Sun, 10 Feb 2008, Junio C Hamano wrote:
Show 16 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes: > > > 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?
Your patch wouldn't corrupt them, but also didn't explicitly protect them. A later change to regularize git shell scripts would look reasonable but risk messing with them, for example.
Show 5 quoted lines
> > 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?
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. And I'm actually curious as to whether t/ should have some protection against crlf conversion. (I haven't tried checking git out with different crlf-conversion settings and seeing whether the tests still work as intended)
-Daniel *This .sig left intentionally blank*