Skip to content

Instantly share code, notes, and snippets.

@monokrome
Forked from fearofcode/pre-commit
Last active December 25, 2015 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monokrome/6911822 to your computer and use it in GitHub Desktop.
Save monokrome/6911822 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# rename pre-commit.sample in the hooks directory to pre-commit and replace its content with this
set_traces=`git grep ".set_trace()"`
if [ ! -z "$set_traces" ] ; then
echo "You have pdb.set_trace() in your code! Commit aborted!"
echo $set_traces
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment