[#858] restore the exit from the pre-commit hook
Merge with master