[dmd-internals] LF and CRLF on git
Walter Bright
walter at digitalmars.com
Tue Jan 15 19:14:54 PST 2013
I also like the idea of the autotester rejecting any files with CRLF. Brad?
On 1/15/2013 6:48 PM, Andrei Alexandrescu wrote:
> Yah, we should add a pre-commit hook. I found a script on the net. How do we
> load it into .git/hooks/ so everybody gets it?
>
> Andrei
>
> On 1/15/13 9:24 PM, Daniel Murphy wrote:
>> 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
>> <mailto: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 <mailto:dmd-internals at puremagic.com>
>> http://lists.puremagic.com/__mailman/listinfo/dmd-internals
>> <http://lists.puremagic.com/mailman/listinfo/dmd-internals>
>>
>>
>>
>>
>> _______________________________________________
>> dmd-internals mailing list
>> dmd-internals at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-internals
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>
>
More information about the dmd-internals
mailing list