Skip to content

Instantly share code, notes, and snippets.

@fukajun
Last active December 15, 2015 08:29
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 fukajun/5231263 to your computer and use it in GitHub Desktop.
Save fukajun/5231263 to your computer and use it in GitHub Desktop.
git commit の時にRubyの古いスタイルのハッシュをチェックするフック
#!/bin/sh
echo "========Check old type hash statement========="
git diff --cached | grep ":[^ ]* *=> *:[^ ]*"
result=$?
ret=0
if [ $result -eq 0 ]; then
echo "!!!!!!!!Include old type hash statement!!!!!!!"
ret=1
fi
echo "=============================================="
exit $ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment