[dmd-internals] LF and CRLF on git

Brad Roberts braddr at puremagic.com
Tue Jan 15 20:49:19 PST 2013


On 1/15/2013 8:36 PM, Andrei Alexandrescu wrote:
> On 1/15/13 10:31 PM, Brad Roberts wrote:
>> Correct, and github has no mechanism for it either.  So, I'm happy to
>> add this checking to the load balancer, but someone else build the
>> hook and play with it and get it working w/in their own environment
>> first .  There's no reason it shouldn't be put in developer
>> repositories and catch the problem BEFORE they get committed locally.
>> The auto tester can be the second layer of defense.
> 
> I tried real hard to make http://gergap.wordpress.com/2010/05/12/git-crlf-hook/ work, but for some reason I couldn't get
> the update hook to run at all - even when I inserted an "exit 1" on the first line.
> 
> My procedure: copy the file into .git/hooks/update, make some changes, commit, and push to my github repo. The update
> hook never runs.
> 
> I did get the pre-commit script to run, but I couldn't find a pre-commit hook for crlf on the net and I don't have the
> time to investigate writing one.
> 
> 
> Andrei

That's what I meant earlier when I said that github has not mechanism for it.. they do not support running hooks in
repos.  I meant that developers should have them in their LOCAL repositories for when they commit before pushing changes
to github.



More information about the dmd-internals mailing list