[dmd-internals] LF and CRLF on git

Daniel Murphy yebblies at gmail.com
Tue Jan 15 18:24:10 PST 2013


My git setup screams at me when I try to stage files with windows line
endings.  If we put this in the gitconfig...

An alternative would be to have the autotester reject pulls that add \r\n's.

Relying on all contributors to do the setup themselves doesn't seem like it
will work.

On Wed, Jan 16, 2013 at 8:47 AM, Walter Bright <walter at digitalmars.com>wrote:

> I have had a bunch of trouble lately with git, which I suspect was the
> result of checking in a new file that had CRLF line endings instead of LF.
> I know that git is supposed to be able to deal with this, but my experience
> suggests it has a schizophrenic behavior regarding this.
>
> My git checkin procedure is done with a script that prefaces it with:
>
> tolf filename
> detab filename
>
> tolf ensures that the line endings are LF, and detab converts tabs to
> spaces. This canonicalizes all entries into git, and avoids all the ugly
> problems with CRLF.
>
> Please ensure that you add these to your checkin workflow, or something
> equivalent. No, the .git settings are not sufficient.
>
> (BTW, if someone wrote a D source code formatter, I'd love to add that to
> our checkin process!)
> ______________________________**_________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/**mailman/listinfo/dmd-internals<http://lists.puremagic.com/mailman/listinfo/dmd-internals>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20130116/89c71f7d/attachment.html>


More information about the dmd-internals mailing list