[phobos] [dmd-internals] svn-->git migration

Johannes Pfau johannespfau at googlemail.com
Mon Jan 24 23:58:02 PST 2011


On Mon, 2011-01-24 at 12:28 -0800, Walter Bright wrote:
> 
> Jens Mueller wrote:
> > I'll guess not. Because
> > core.autocrlf = true means
> > "Use this setting if you want to have CRLF line endings in your working
> > directory even though the repository does not have normalized line endings."
> > (see man git-config)
> >
> > See here for further explanation:
> > http://stackoverflow.com/questions/3206843/how-line-ending-conversions-work-with-git-core-autocrlf-between-different-operati
> >
> > The part "Moving forward" on github seems rather strange to me.
> >
> >   
> 
> I tried various settings a few months back, and failed miserably. Nobody 
> I asked could tell me what the various settings actually did, none of 
> the online explanations made any sense (*). My takeaway was:
> 
> 1. do not attempt to use git on Windows
> 2. write tolf.d and fix all line endings to \n before submission to git
> 
> So far, that works.
> 
> 
> (*) First off, there were several settings. Nobody could tell me if git 
> stored the files in its database with canonicalized line endings, what 
> happened to the original files (were they modified by git?) and what 
> happens when files were restored from git (line endings left as is, 
> rewritten, what?), if only the diff programs affected, was the sha hash 
> affected, etc.
> 
> Clearly, at a deep fundamental level, git works with binary files. Not 
> text files. Attempting to hammer it to work with text files is just doomed.
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

The "core.autocrlf" section on http://progit.org/book/ch7-1.html says:

"Git can handle this by auto-converting CRLF line endings into LF when
you commit, and vice versa when it checks out code onto your filesystem.
You can turn on this functionality with the core.autocrlf setting. If
you’re on a Windows machine, set it to true — this converts LF endings
into CRLF when you check out code"

and

"If you’re on a Linux or Mac system that uses LF line endings, then you
don’t want Git to automatically convert them when you check out files;
however, if a file with CRLF endings accidentally gets introduced, then
you may want Git to fix it. You can tell Git to convert CRLF to LF on
commit but not the other way around by setting core.autocrlf to input"



More information about the phobos mailing list