Skip to content

Instantly share code, notes, and snippets.

@imiroslavov
Created December 12, 2019 11:32
Show Gist options
  • Save imiroslavov/64829c747167ad187d12c7d14a410ea0 to your computer and use it in GitHub Desktop.
Save imiroslavov/64829c747167ad187d12c7d14a410ea0 to your computer and use it in GitHub Desktop.
#!/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