Sunday 25 December 2011

Why we shouldn't switch to git, part 2

If unnecessarily bad performance in the usual configuration for anyone on Windows Vista or above wasn't bad enough, msysgit also automatically sets up terrible defaults, leaving first-time developers' heads scratching.

Mercurial, of course, does the right thing here and leaves files alone.

Practically every editor on Windows -- Visual Studio, emacs, vim, Sublime Text -- supports LF endings just fine. As far as I know, Notepad's the only one that doesn't. If you're optimizing for Notepad over everything else, something's really gone wrong.

1 comments:

Daniel said...

> As far as I know, Notepad's the only one that
> doesn't [support LF endings].

Regarding issues with LF endings -- the Mercurial "EOL" extension transparently converts Windows line-endings (only in added/modified files) at commit / qref time. Users just need to add "hgext.eol =" under [extensions] in their hgrc.

So, anyone who's at-risk for introducing CRLF line-endings could simply turn on that extension and be protected from themselves. :)

See http://mercurial.selenic.com/wiki/EolExtension for more.