Re: [PATCH 2/2] checkout: fix attribute handling in checkout all
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Aug 13, 2007, 06:50 UTC
- Message-ID
- <5BA0164D-8327-4B01-84CD-595D8573BEEF@zib.de>
- In-Reply-To
- <46BFFB1A.4070704@trolltech.com>
On Aug 13, 2007, at 8:32 AM, Marius Storm-Olsen wrote:
Show 28 quoted lines
> Junio C Hamano said the following on 13.08.2007 08:14: >> Ok, let's step back a bit and I'll suggest an alternative >> approach to your 1/2. This would hopefully solve 2/2 without >> any code change your patch 2/2 has. > (..snip..) >> I think this approach is very much in line with how the git >> plumbing works, but you would need to know how the world is >> designed to work in order to appreciate it fully. Let's have a >> few paragraphs to give the readers some background. > (..snip..) >> Currently, the attr_stack code reads only from the work tree >> and work tree alone. We could change it to: >> - If the directory on the work tree has .gitattributes, use it >> (this is what the current code does); >> - Otherwise if the index has .gitattributes at the >> corresponding path, use that instead. >> This essentially treats not having .gitattributes files checked >> out as equivalent to having these files checked out unmodified, >> which is very much in line with how the world is designed to >> work. > > ACK! We really need this! :-) > > In msysgit.git/etc/.gitattributes we have 'termcap -crlf', to avoid > the termcaps being checked out with Windows EOL, if the user > happens to have 'autocrlf = true'. However, when you checkout the > working dir the first time it still has Windows EOL due to exactly > this problem.
And exactly this is where I recognized the issue.
msysgit devs, We should really make autocrlf = true the default for us and fix all problems that we'll encounter. There may be more tricky stuff ahead, like merges, cherry-picks, ...
Steffen