Re: CRLF problems with Git on Win32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 9 Jan 2008, Junio C Hamano wrote:

> Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:
> 
> > On Tue, 8 Jan 2008, Junio C Hamano wrote:
> >>
> >> I think the project can mark text files as text with attributes and 
> >> if the port to the platform initialized core.autocrlf appropriately 
> >> for the platform everything should work as you described.
> >
> > Yes, I think core.autocrlf should default to "true" on Windows, since 
> > that is what it's about. The alternative is to have "fail"/"warn", to 
> > just make sure that nobody can do the wrong thing by mistake.
> >
> > We could just do something like this, although that probably does mean 
> > that the whole test-suite needs to be double-checked (ie now we really 
> > do behave differently on windows outside of any config options!))
> >
> > People who really dislike it can always do the
> >
> > 	git config --global core.autocrlf false
> >
> > thing.
> >
> > (And no, I don't know if "#ifdef __WINDOWS__" is the right thing to 
> > do, it's almost certainly not. This is just a draft.)

IMHO this is really not good.  Better do it in the global /etc/gitconfig 
we install _anyway_ (it says core.symlinks=false).

> Perhaps we can do something similar to core.filemode?  Create a file 
> that we would need to create anyway in "text" mode, and read it back in 
> "binary" mode to see what stdio did?

The problem is that MinGW behaves sanely, i.e. it does not output CRLF but 
only LF.

Besides, as I stated several times already, there _are_ projects on 
Windows where you do _not_ want crlf=true:

- Windows is already slow.  So slow that it is not even funny.  Granted, 
  if you use Windows daily, git on MinGW seems snappy, but if you come 
  from Linux, it is slow as hell.

  And CRLF conversion does not help that impression at all.

- Some tools ported to Windows from Unix do not like CRs.

- For git itself, I prefer to work without CRLF just because I do not need 
  it.

But maybe I am the minority here, and we really should default to 
crlf=true on Windows, and provide a way to unset that.

My preference would be to have Peff's -c switch to clone, but 
_additionally_ a way to force a full re-checkout of files (for example 
after "git config core.crlf false").

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux