Created
February 7, 2019 13:16
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
# alternative to https://gist.github.com/SkyM/1641459 | |
FORBIDDEN=$(echo 'declaim break ==== >>>> <<<< string.gmatch inspect' | | |
sed -e 's/ /\\\|/g') | |
git diff --cached | grep '^+' | sed -e 's/--.*//' | | |
grep -n $FORBIDDEN && | |
echo "COMMIT REJECTED Found '$FORBIDDEN' references. Please remove them before commiting" && | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment