[dmd-internals] LF and CRLF on git

Leandro Lucarella luca at llucax.com.ar
Thu Jan 17 03:52:59 PST 2013


Walter Bright, el 16 de January a las 13:45 me escribiste:
> 
> 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.

User's git if set up as a hook. But I was talking about putting it as
a safety net in the autotester.

BTW, you can put some kind of hooks in github, but using the API:
https://help.github.com/articles/post-receive-hooks

But of course you need a web server hosting the hooks to actually work.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
PROTESTA EN PLAZA DE MAYO: MUSICO SE COSIO LA BOCA
	-- Crónica TV


More information about the dmd-internals mailing list