[dmd-internals] LF and CRLF on git

Walter Bright walter at digitalmars.com
Wed Jan 16 13:45:03 PST 2013


On 1/16/2013 1:34 PM, Leandro Lucarella wrote:
> Walter Bright, el 15 de January a las 21:30 me escribiste:
>> On 1/15/2013 7: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.
>> While you're adding the check for CRLF in the autotester, can you
>> please also add a check to reject any .d files with tab characters?
>> (Just for .d files. Don't want to do that for makefiles!)
> While you're at it, you could also add some checks for other common
> white space errors. The sample pre-commit hook that comes with each
> repository have this check enabled, you just have to enable that hook by
> renaming it from pre-commit.sample to just pre-commit. Then you have to
> adjust the git config core.whitespace to whatever you want to check
> (there are several options, see git config --help for details).
> Unfortunately those checks don't include either the CRLF check or the
> "all spaces" (there is an option to check the opposite, that only tab is
> used for indentation), but it cover other common errors as trailing
> white spaces.


Does this happen on the user's git, or github? Note that we cannot control the 
user's git.



More information about the dmd-internals mailing list