mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 19:46:54 +00:00
nocommit pre-hook
This commit is contained in:
parent
f0bf512dbb
commit
d3cb871783
5 changed files with 33 additions and 1 deletions
16
pre_commit_hooks/no_commit_keywords.sh
Normal file
16
pre_commit_hooks/no_commit_keywords.sh
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/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
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue