有没有人使用过下面的脚本,对他熟悉吗?
pre-commit
#!/bin/sh
REPOS="$1"
TXN="$2"
SVNLOOK=/opt/CollabNet/bin/svnlook
LOGMSG=$($SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c)
if [ "$LOGMSG" -lt 10 ]; then
echo -e "Empty log message not allowed. Commit aborted!" 1>&2
exit 1
fi
exit 0