Re: [PATCH] Respect crlf attribute even if core.autocrlf has not been set
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 23, 2008, 17:22 UTC
- Message-ID
- <alpine.DEB.1.00.0807231817460.8986@racer>
- In-Reply-To
- <7vej5kfs0w.fsf@gitster.siamese.dyndns.org>
Hi,
On Wed, 23 Jul 2008, Junio C Hamano wrote:
Show 11 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > However, if you want to avoid CRs to _enter_ the repository, when you > > have a lot of binary files tracked, you _do_ want to force all > > repositories to crlf=input. > > If you are on a sane system, you do not even want to pay the price of > conversion. Only people on systems with CRLF line endings should pay > the price (because your aim is to convert on such systems). Are we > throwing that out of the window when the project decides to use > gitattributes?
Well, if you do not want that, why do you set crlf in the gitattributes to begin with?
> How about setting autocrlf automatically on mingw/msys/cygwin versions, > perhaps via templates or a patch to init-db? Would that, combined with > user education, be a viable alternative?
On msys we do that. A few users decided they know better and switched it off. Me for example. But I wouldn't do something as stupid as editing a file with an editor that tries to be helpful and adds CR/LFs.
However, Cygwin? No, they don't. I don't see them change it, either.
The _only_ way we could do that is by setting auto_crlf in environment, depending on the platform.
HOWEVER: as you can see from the git-svn post this morning, there are known issues with autocrlf.
We also had much fun (not!) with a lot of users who were really happy to insult us for the change to set autocrlf to true by default (via /etc/gitconfig) in msysGit.
Ciao, Dscho