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.
This commit is contained in:
parent
d7f194f94e
commit
cfcb8497bf
2 changed files with 8 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
local_hook="$HOME"/.git_template.local/hooks/pre-commit
|
||||
[ -f "$local_hook" ] && . "$local_hook"
|
||||
|
||||
if [ -f "$local_hook" ]; then
|
||||
. "$local_hook"
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
local_hook="$HOME"/.git_template.local/hooks/prepare-commit-msg
|
||||
[ -f "$local_hook" ] && . "$local_hook"
|
||||
|
||||
if [ -f "$local_hook" ]; then
|
||||
. "$local_hook"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue