Subject: Re: Git no longer reads attributes from the index properly

From: Michael J Gruber <[email-masked]>
Date: Fri, 20 Mar 2009 10:45:06 +0100

Brian Downing venit, vidit, dixit 20.03.2009 09:40:
> 
> On Fri, Mar 20, 2009 at 01:27:31AM -0700, Junio C Hamano wrote:
>> [email-masked] (Brian Downing) writes:
>>> As of 34110cd4e394e3f92c01a4709689b384c34645d8, (2008-03-06, just over a
>>> year ago), Git no longer reads attributes from the index properly in all
>>> cases....
>>
>> Perhaps you would want to try it on 06f33c1 (Read attributes from the
>> index that is being checked out, 2009-03-13) that is part of 'pu'?
> 
> I only tried it on next, groan.  Yes, it works there, thanks.
> 
> However, that commit looks like it's solving a different problem
> entirely (supporting changing between two branches where .gitattributes
> exists in both cases) and happens to fix the no .gitattributes -> read
> from index regression at the same time.  I don't know enough about the
> guts to tell, but does this also fix the core problem of the regression
> (I assume something about trying to read from the wrong index, given the
> commit that broke it), or does it just happen to work around it?
> 
> Specifically, it would be nice to have a fix for the regression that
> could land on maint relatively soon, as the initial checkout case is
> breaking a real repository I use, whereas the switching branches case is
> something I don't care about as much at the moment.
> 
> Of course, I don't know how to fix it at the moment, and beggars can't
> be choosers.  :)

You're testing whether a checkout without index and with empty work tree
works, right?

In that case, the checkout needs to make sure that .gitattributes is
checked out (or at least respected) before all other files, and that is
exactly what the patch in pu does. [If I remember right that great
simplification patch you bisected as bad played a role there, unless I'm
mixing up threads...]

Michael