首页 > 其他 > 详细

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

时间:2017-05-04 22:50:29      阅读:369      评论:0      收藏:0      [点我收藏+]

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


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

原文:http://mysky0708.blog.51cto.com/474802/1922181

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!