千家信息网

pre-commit脚本--commit前必须填写messages

发表于:2025-02-02 作者:千家信息网编辑
千家信息网最后更新 2025年02月02日,#!/bin/shrepos="$1"txn="$2"res="ok"# make sure that the log message contains some text.svnlook=/usr/
千家信息网最后更新 2025年02月02日pre-commit脚本--commit前必须填写messages

#!/bin/sh


repos="$1"

txn="$2"


res="ok"

# make sure that the log message contains some text.

svnlook=/usr/local/svn/bin/svnlook

$svnlook log -t "$txn" "$repos" | egrep "[^[:space:]]+" >/dev/null || unset res

if [ "$res" != "ok" ]

then

echo "you must input some comments for you commit" >&2

exit 1

fi


# all checks passed, so allow the commit.

exit 0


0