Re: [PATCH 3/3] Teach "git branch" about --new-workdir

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

 



Hi,

On Tue, 24 Jul 2007, Marius Storm-Olsen wrote:

> 1) IMO, git should on Windows always do CRLF conversion, as this is what
> Windows developers in general expect. (CRLF text-files that is, not the
> conversion.) Meaning that
>     core.autocrlf = Windows
> by default. Where 'Windows' would be of true/false value which is true
> when on Windows and false when on other platforms. (Not that we should
> _have_ such an option, but the concept at least.)

I do not think so.

core.autocrlf is only about the relationship between the working tree and 
the repository.

So if you want CR/LF line endings always, just do not set that flag 
(which defaults to false).

If you want LF line endings in the repo, but not necessarily in the 
working tree, set core.autocrlf to input.

If you want LF line endings sometimes, but CR/LF at other times, but do 
not care if the revisions in the repository will have LF or CR/LF, do not 
set that flag.

Git is really slowed down tremendously just by the fact that it runs on 
Windows.  You should not add to that.

IMHO in most cases -- even on Windows -- you do not want to set autocrlf 
at all.  Because you do not need to store the file different from the 
version you have in the working tree.

The only situation where I think it makes sense, is when you have both 
Windows and Unix developers, _and_ your Windows tools sometimes produce 
CR/LF stupidly.  But then I'd set it to "input".

BTW no need to fuzz about binary files, which want to be in the object 
database without being converted.  Our heuristics has so far been pretty 
successful in discerning binary from text files.

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