hooks are ignored if there are not marked as executable
- From
Damien <damien@dam.io>
- Date
- Oct 2, 2017, 10:06 UTC
- Message-ID
- <CAAQ5yigO8FxhUjwr68OnW0UEYck2AKF5P0Qt_zedhBL_SEiKTw@mail.gmail.com>
Hi,
If you do `echo my_script > .git/hooks/pre-commit` and then `git commit`, The hook is just gonna be ignored. But if you do `chmod +x .git/hooks/pre-commit`, then it's executed.
I think ignoring a hook is misleading and not newbie friendly, an error message to signal an incorrectly configured hook could be better. At least as a warning to be backward-compatible.
Thanks, Damien