Last active
February 6, 2017 14:35
-
-
Save oldpatricka/9914747 to your computer and use it in GitHub Desktop.
Pre-commit hook to check for fixes or todos
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
#!/bin/sh | |
. git-sh-setup # for die | |
git-diff-index -p -M --cached HEAD -- | grep '^+' | | |
egrep 'TODO|FIXME|PDA' && die Blocking commit because string TODO/FIXME/PDA detected in patch | |
: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment