mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
removed precommit-hook
This commit is contained in:
parent
b9be9eb50f
commit
9a9decbdd4
1 changed files with 0 additions and 37 deletions
|
@ -1,37 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# this file is installed in the repository as file: .git/hooks/pre-commit
|
||||
|
||||
# we check for `./src/deps/facilio` in the list of files to be committed and
|
||||
# only allow to proceed if the IKNOWWHATIMDOING env var is set
|
||||
|
||||
if git rev-parse --verify HEAD >/dev/null 2>&1
|
||||
then
|
||||
against=HEAD
|
||||
else
|
||||
# Initial commit: diff against an empty tree object
|
||||
against=$(git hash-object -t tree /dev/null)
|
||||
fi
|
||||
|
||||
# Redirect output to stderr.
|
||||
exec 1>&2
|
||||
|
||||
|
||||
if git diff --name-only --cached --diff-filter=M | grep 'src/deps/facilio' > /dev/null; then
|
||||
if [ "$IKNOWWHATIMDOING" = "" ] ; then
|
||||
cat <<\EOF
|
||||
Error: src/deps/facilio is staged for commit.
|
||||
|
||||
This is most likely unintentional. Pease consider if this is what you want.
|
||||
|
||||
See `CONTRIBUTING.md` for an explaination.
|
||||
|
||||
If you know what you are doing you can disable this check using:
|
||||
|
||||
IKNOWWHATIMDOING=true git commit ...
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
echo "WARNING: src/deps/facilio is staged for commit. See CONTRIBUTING.md"
|
||||
fi
|
||||
|
Loading…
Add table
Reference in a new issue