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

Re: wrong handling of text git attribute leading to files incorrectly reported as modified

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2014, 16:50 UTC
Message-ID
<xmqqob01i5h0.fsf@gitster.dls.corp.google.com>
In-Reply-To
<B3DF4E4A-F740-4588-AFD5-74D99E5299F5@ammeter.ch>
Frank Ammeter <git@ammeter.ch> writes:
Show 13 quoted lines
> Am 15.04.2014 um 23:23 schrieb Junio C Hamano <gitster@pobox.com>:
>
>> Brandon McCaig <bamccaig@gmail.com> writes:
>> 
>>> That is for your benefit, and for easily sharing that configuration
>>> with collaborators. Git only cares that the file exists in your
>>> working tree at run-time.
>> 
>> It is a lot more than "for sharing".  If you made .gitignore only
>> effective after it gets committed, you cannot test your updated
>> version of .gitignore is correct before committing the change.
>
> Ok, I can follow that logic for .gitignore, but I was talking about .gitattributes...

They are conceptually the same thing, so if you can follow the logic for .gitignore, you already can follow the logic for .gitattributes.

The only two readons we have a separate .gitignore are because other SCMs had a similar mechanism, and because it came before attributes. If we didn't have these two constraints, it would have made a lot more sense to express "this path is to be ignored" by setting "ignored" attribute.

Previous: Frank AmmeterNext: Holger Hellmuth
Message 7 of 8 in “wrong handling of text git attribute leading to files incorrectly reported as modified”
  1. Frank AmmeterApr 11, 2014
  2. Torsten BögershausenApr 11, 2014
  3. Frank AmmeterApr 12, 2014
  4. Brandon McCaigApr 15, 2014
  5. Junio C HamanoApr 15, 2014
  6. Frank AmmeterApr 16, 2014
  7. Junio C HamanoApr 16, 2014
  8. Holger HellmuthApr 16, 2014

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.