[BUG] DOS filetype and pre_commit hook

From: MALET Jean-Luc <hidden>
Date: 2016-06-15 22:44:11

I use git for tracking change on the project I'm working on and the 
sourcecode is in dos text encoding (<CR><LF>)
when I commit I have to use the --no-verify option because the perl part 
of the hook (btw isn't it possible to have git not depend on perl?) 
don't use the right regexp to track if there is trailing whitespace
the corresponding regex to be used with grep is :
grep -E '^\+.*[[:blank:]]+[[:space:]]$'

because <CR> is matched by [[:space:]] and then a line like :

no trailing whitespace<CR><LF>

will trigger a trailing whitespace event

See the attached file that correct the issue

Best Regards,
JLM

-- 
KISS! (Keep It Simple, Stupid!)
(garde le simple, imbécile!)
"mais qu'est-ce que tu m'as pondu comme usine à gaz? fait des choses 
simples et qui marchent, espèce d'imbécile!"

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help