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

Re: .gittattributes handling has deficiencies

From
Steffen Prohaska <prohaska@zib.de>
Date
Oct 21, 2007, 10:27 UTC
Message-ID
<B61AE1A9-E983-4ACE-BF71-8FDC113A4F34@zib.de>
In-Reply-To
<Pine.LNX.4.64.0710210204580.4818@asgard>
On Oct 21, 2007, at 11:19 AM, david@lang.hm wrote:
Show 9 quoted lines
>> But this is really hard to solve. We would need to compare
>> attributes before and after for _all_ files that have attributes
>> in one of the two commits and check if they changed. If so, we
>> need to do a fresh checkout according to the new attributes.
>
> if you know that you will get the new .gitattributes if it changes,  
> setup a post-checkout hook to checkout everything if it has  
> changed. it's far from ideal, but it should be a good, safe, first  
> approximation.

That's not good enough. I'll stop using .gitattributes. I need to teach >40 devs how to use git on Windows. I only use features that work flawlessly. .gitattributes doesn't. It bit me twice now.

Luckily, core.autocrlf works if you set it before the first checkout and never change it. This seems sufficient for me if all files that have mixed line endings are fixed right away.

	Steffen
Previous: david@lang.hmNext: david@lang.hm
Message 3 of 14 in “.gittattributes handling has deficiencies”
  1. Steffen ProhaskaOct 21, 2007
  2. david@lang.hmOct 21, 2007
  3. Steffen ProhaskaOct 21, 2007
  4. david@lang.hmOct 21, 2007
  5. Steffen ProhaskaOct 21, 2007
  6. david@lang.hmOct 21, 2007
  7. Steffen ProhaskaOct 21, 2007
  8. david@lang.hmOct 21, 2007
  9. david@lang.hmOct 22, 2007
  10. Steffen ProhaskaOct 22, 2007
  11. Shawn O. PearceOct 22, 2007
  12. Steffen ProhaskaOct 22, 2007
  13. Johannes SchindelinOct 22, 2007
  14. Steffen ProhaskaOct 22, 2007

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.