Created
February 3, 2012 00:17
-
-
Save DiegoSalazar/1726679 to your computer and use it in GitHub Desktop.
pre-commit hook to alert if a certain string found in code
This file contains hidden or 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 | |
RED="\033[0;31m" | |
WHITE="\033[1;37m" | |
if git diff-index -p -M --cached HEAD | grep '#debug' > /dev/null; then | |
#echo 'debug lines found in commit. Aborting' >&2 | |
#exit 1 | |
echo "\n\t${RED}You left a debug comment in the code!${WHITE}\n" >&2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment