g cfg --get "remote.${remote}.url" >/dev/null && break
done
fi
+ review=$(g cfg --get "remote.${remote}.review")
remote_branch=${remote_branch#refs/heads/}
git_args=()
shift
done
+ ref_spec="${branch}:refs/for/${remote_branch}"
if [[ -n ${reviewers} ]] ; then
reviewers=( ${reviewers//,/ } )
- git_args+=( "--receive-pack=git receive-pack ${reviewers[*]/#/--reviewer=}" )
+ if [[ ${review} != ssh://* ]] ; then
+ gob_args=$(printf 'r=%s,' "${reviewers[@]}")
+ ref_spec+="%${gob_args%,}"
+ else
+ git_args+=( "--receive-pack=git receive-pack ${reviewers[*]/#/--reviewer=}" )
+ fi
fi
- vr git push "${git_args[@]}" ${remote} ${branch}:refs/for/${remote_branch} && exit
+ vr git push "${git_args[@]}" ${remote} ${ref_spec} && exit
err "could not figure out remote to push to"
;;
sync)