Add TODO check to pre-commit-hook
This commit is contained in:
parent
bce4a9b318
commit
a3cf49de01
|
@ -6,6 +6,14 @@ else
|
|||
against=$(git hash-object -t tree /dev/null)
|
||||
fi
|
||||
|
||||
# https://stackoverflow.com/a/7292992
|
||||
. git-sh-setup # for die
|
||||
if git-diff-index -p -M --cached $against -- \
|
||||
| grep '^+' \
|
||||
| grep TODO; then
|
||||
die Blocking commit because string TODO detected in patch
|
||||
fi
|
||||
|
||||
# If you want to allow non-ASCII filenames set this variable to true.
|
||||
allownonascii=$(git config --type=bool hooks.allownonascii)
|
||||
|
||||
|
|
Loading…
Reference in a new issue