Created
December 12, 2019 11:32
-
-
Save imiroslavov/64829c747167ad187d12c7d14a410ea0 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
MATCH=$(git diff --staged | grep -E "(dd|dump)\(.*\)") | |
if [[ ! -z "$MATCH" ]]; then | |
echo "Detected a dd()|dump() in one of your files. Aborting commit!" | |
echo "$MATCH" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment