Last active
December 29, 2016 06:04
-
-
Save dkrnl/5a94b956c676423c7c27abc7b2674861 to your computer and use it in GitHub Desktop.
SVN pre-commit: commit message required
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" | |
export LANG="ru_RU.UTF-8" | |
SVNLOOK=/usr/bin/svnlook | |
LOGMSG=$($SVNLOOK log -t "$TXN" "$REPOS" | wc -m) | |
if [ "$LOGMSG" -lt 15 ]; | |
then | |
echo "Error: commit message is less than 15 characters long" 1>&2 | |
exit 1 | |
fi | |
# Exit on all errors. | |
set -e | |
# All checks passed, so allow the commit. | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment