office-gobmx/git-hooks
Norbert Thiebaud 41f9319cda fixing trailing whitespaces in pre-commit hook is broken.
The pre-commit hook had code that was trying to detect and _fix_
trailing whitespaces. this code was broken. If you try to do a partial
commit on a file and the part your are partially commiting contain
offending lines, the process to try to fix them drop the rest of the
changes.

In general it is very dangerous to try to be cute in a pre-commit hook
a pre-commit hook you tell you something is wrong, and preferably were
it think that it is wrong... but should not attempt to 'fix' things
silently. So I did not try to 'fix' that code.
Instead I replaced it by a straight forward 'detection-only', lifted from
the linux-kernel's git hook.
2011-06-22 01:42:47 -05:00
..
commit-msg
post-merge
pre-commit fixing trailing whitespaces in pre-commit hook is broken. 2011-06-22 01:42:47 -05:00