Re: Surprising interaction of "binary" and "eol" gitattributes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 10, 2015, 22:54 UTC
- Message-ID
- <xmqqsidcxy2q.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <54FF6D23.4060301@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 11 quoted lines
> Well, that's true, but the "eol" attribute can regain its effect if > "binary" is followed by "text" or "text=auto". So I guess the simplest > question is as follows. Suppose I have the following .gitattributes: > > a.foo eol=crlf > a.foo binary > a.foo text > > It is obvious in this case that a.foo should be treated as a text file. > Should it be processed with "eol=crlf", or should the intervening > "binary" imply "-eol"?
I would say former. You find out what attributes apply to a path and then consider the collective effect of these attributes that survived.
So the second "No it is not text" which is overruled by the "oops, no that is text" later should not get in the picture, I would say.
As binary is not just -text and turns other things off, those other things will be off after these three.