Created
March 22, 2014 08:31
-
-
Save anytizer/9703209 to your computer and use it in GitHub Desktop.
Pre-Commit hook disallowing empty messages
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/sh | |
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