Created
May 13, 2010 10:39
-
-
Save badsyntax/399710 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
# | |
# example commit-msg hook to prevent commit messages with less than 20 characters | |
message=`cat $1` | |
message_length=`echo ${#message}` | |
if [ $message_length -lt 20 ]; then | |
echo "Commit failed. The commit message is less than 20 characters. (length is $message_length)" | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment