pre-commit 191 B

1234567891011
  1. #!/bin/sh
  2. for FILE in `git diff --name-only --cached`; do
  3. grep 'TODO' $FILE 2>&1 >/dev/null
  4. if [ $? -eq 0 ]; then
  5. echo $FILE ' contains TODO'
  6. exit 1
  7. fi
  8. done
  9. exit