Last active
December 11, 2015 15:18
-
-
Save iamleeg/4620038 to your computer and use it in GitHub Desktop.
A quick and dirty pre-commit hook to let me flag code that shouldn't be committed.
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/bash | |
git diff --cached -SNSLog --quiet | |
if [ $? -eq 1 ]; then | |
echo "NSLog call detected, indicating debug code is staged. Please unstage your debug code." | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment