Skip to content

Instantly share code, notes, and snippets.

@ryantanner
Forked from jonasschmidt/pre-commit
Created August 18, 2014 23:17
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 ryantanner/eeee650a413932b8d83f to your computer and use it in GitHub Desktop.
Save ryantanner/eeee650a413932b8d83f to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
if `git diff --cached spec` =~ /,\s?(:focus|focus:\s?true|:focus\s?=>\s?true)/
puts "\e[31mPlease focus and remove your :focus tags before committing :)"
exit 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment