Created
March 10, 2014 09:07
-
-
Save anytizer/9461728 to your computer and use it in GitHub Desktop.
Pre-Commit script
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 | |
# http://blog.grimsy.net/2008/07/a-few-svn-pre-commit-hooks/ | |
REPOS="$1" | |
TXN="$2" | |
# Make sure that the log message contains some text. | |
SVNLOOK=/usr/bin/svnlook | |
SVNLOOKOK=1 | |
$SVNLOOK log -t "$TXN" "$REPOS" | \ | |
grep "[a-zA-Z0-9]" > /dev/null || SVNLOOKOK=0 | |
if [ $SVNLOOKOK = 0 ]; then | |
echo Empty log messages are not allowed. Please provide a proper log message. 1>&2 | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment