Last active
December 15, 2015 08:29
-
-
Save fukajun/5231263 to your computer and use it in GitHub Desktop.
git commit の時にRubyの古いスタイルのハッシュをチェックするフック
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 | |
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