Skip to main content
您好,欢迎光临IDC汇,需要什么服务器直接咨询客服,方便快捷。客服QQ 点击这里给我发消息
首页 > 服务器技术 »正文

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

服务器技术 webadmin 2020-07-01 08:48:00 查看评论 加入收藏

#!/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 


广告06

微信