pre-commit-hooks/pre_commit_hooks/no_commit_keywords.sh
2020-06-09 20:32:40 +00:00

16 lines
213 B
Bash

#!/bin/bash
set -e
NOCOMMIT_PRESENT=$(git grep --ignore-case nocommit)
if [ -n $NOCOMMIT_PRESENT ]
then
echo "#nocommit tagged - commit prevented"
echo $NOCOMMIT_PRESENT
exit 1
else
exit 0
fi