added fly out pagination
This commit is contained in:
1 parent
36eed141c8
commit
586d4a4bec
8 files changed
+118
-14188
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# block committing the bot/monitor configured in development mode
|
||||
#
|
||||
# the deployed branch must always run in production. this rejects any staged
|
||||
# python that sets DEVELOPMENT_MODE = DevelopmentMode.DEVELOPMENT. keep
|
||||
# DEVELOPMENT in your working tree while developing, just don't stage that line.
|
||||
#
|
||||
# activate once per clone: git config core.hooksPath .githooks
|
||||
|
||||
pattern='^[[:space:]]*DEVELOPMENT_MODE[[:space:]]*=[[:space:]]*DevelopmentMode\.DEVELOPMENT\b'
|
||||
offenders=""
|
||||
|
||||
for file in $(git diff --cached --name-only --diff-filter=d -- '*.py'); do
|
||||
if git show ":$file" | grep -qE "$pattern"; then
|
||||
offenders="$offenders $file"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$offenders" ]; then
|
||||
echo "pre-commit: refusing to commit DEVELOPMENT mode in:$offenders" >&2
|
||||
echo " set DEVELOPMENT_MODE = DevelopmentMode.PRODUCTION before committing," >&2
|
||||
echo " or 'git restore --staged <file>' to leave it out of this commit." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user