precommit
This commit is contained in:
commit
4ab65b9d5c
1 changed files with 11 additions and 0 deletions
11
hooks/pre-commit
Executable file
11
hooks/pre-commit
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if git diff --cached --name-only --diff-filter=ACMR | xargs grep -nH 'breakpoint'
|
||||||
|
then
|
||||||
|
echo "You have breakpoints in your code, remove them before committing!"
|
||||||
|
echo "If you want to bypass this run git commit --no-verify -m 'msg'"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
Reference in a new issue