Created
May 27, 2014 12:05
-
-
Save rethab/21cc309e4c82fd0f5cb4 to your computer and use it in GitHub Desktop.
Commit Hook: make sure no unwanted content gets commited
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
SEARCH_DIRS="application/ library/COP/" | |
declare -a names=("Zend_Debug" "var_dump" "die(") | |
for UNWANTED_CONTENT in "${names[@]}" | |
do | |
if git grep $UNWANTED_CONTENT $SEARCH_DIRS > /dev/null 2>&1 | |
then | |
echo "$UNWANTED_CONTENT found" | |
exit 1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment