scatterd-dotfiles/git_template/hooks/pre-commit
Brandon Cordell cfcb8497bf Fix pre-commit, prepare-commit-msg hooks
For users who had not overridden the `pre-commit` or
`prepare-commit-msg` Git hooks,
they would see `git commit` hang,
with nothing happening.

The command would exit without going to their editor.

The bug was introduced in d7f194f94e
and the fix is to return a 0 exit code when the override is not present.
2014-12-05 11:35:15 -08:00

7 lines
119 B
Bash
Executable file

#!/bin/sh
local_hook="$HOME"/.git_template.local/hooks/pre-commit
if [ -f "$local_hook" ]; then
. "$local_hook"
fi