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!"