gerrit进行push review的自定义函数

review() {
    branchName=`git rev-parse --abbrev-ref HEAD`
    branchAndTopic="${branchName}"
    
    if [ x"$1" != x"" ]; then
        branchAndTopic="${branchName}""/"$1
    fi
    git push origin HEAD:refs/for/${branchAndTopic}%r=liheyuan@kanyun.com
}

主要是自动选择了分支,防止push错

One thought on “gerrit进行push review的自定义函数

Leave a Reply

Your email address will not be published. Required fields are marked *