From 36fb485661ebbb71a0a6ae0a7b91b774cfcfe3a6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 13 Sep 2012 18:49:15 -0400 Subject: [PATCH] add --re support to g-push --- .bin/r | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.bin/r b/.bin/r index bb754d1..a90d969 100755 --- a/.bin/r +++ b/.bin/r @@ -117,9 +117,29 @@ g-push) fi remote_branch=${remote_branch#refs/heads/} + reviewers="" + while [[ $# -gt 0 ]] ; do + case $1 in + --re) + reviewers=$2 + shift + ;; + *) + err "unknown option: $1" + ;; + esac + shift + done + + git_args=() + if [[ -n ${reviewers} ]] ; then + reviewers=( ${reviewers//,/ } ) + git_args+=( "--receive-pack='git receive-pack ${reviewers[*]/#/--reviewer=}'" ) + fi + for remote in cros-internal cros origin ; do if g cfg --get "remote.${remote}.url" >/dev/null ; then - vr git push ${remote} ${branch}:refs/for/${remote_branch} + vr git push "${git_args[@]}" ${remote} ${branch}:refs/for/${remote_branch} exit $? fi done -- 2.39.5