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

Re: Git no longer reads attributes from the index properly

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Mar 20, 2009, 09:45 UTC
Message-ID
<49C365A2.5070607@drmicha.warpmail.net>
In-Reply-To
<20090320084031.GD1037@lavos.net>
Brian Downing venit, vidit, dixit 20.03.2009 09:40:
Show 27 quoted lines
> 
> On Fri, Mar 20, 2009 at 01:27:31AM -0700, Junio C Hamano wrote:
>> bdowning@lavos.net (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
Previous: Brian DowningNext: Junio C Hamano
Message 4 of 5 in “Git no longer reads attributes from the index properly”
  1. Brian DowningMar 20, 2009
  2. Junio C HamanoMar 20, 2009
  3. Brian DowningMar 20, 2009
  4. Michael J GruberMar 20, 2009
  5. Junio C HamanoMar 20, 2009

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.