gerrit进行push review的自定义函数

review() {

  branchName=`git rev-parse --abbrev-ref HEAD`
  branchAndTopic="${branchName}"
  echo "$1 is "$1
  if [ -n $1 ]; then
     branchAndTopic="${branchName}""/"$1
  fi

  git push origin HEAD:refs/for/${branchAndTopic}%r=xx1@yy.com,r=xx2@yy.com
}

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

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

Leave a Reply

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