threads / bug / 11923

[BUG] DOS filetype and pre_commit hook

Subject: [BUG] DOS filetype and pre_commit hook

## tl;dr

One message between Feb 6, 2008 and Feb 6, 2008.

replies: 0people: 1as markdown or json

MALET Jean-Luc· Feb 6, 2008, 22:22 UTC · lore

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

← back to recent threads