if ! remote_branch=$(g cfg --get "branch.${branch}.merge") ; then
err "could not figure out remote branch"
fi
+ if ! remote=$(g cfg --get "branch.${branch}.remote") ; then
+ for remote in cros-internal cros origin ; do
+ g cfg --get "remote.${remote}.url" >/dev/null && break
+ done
+ fi
remote_branch=${remote_branch#refs/heads/}
git_args=()
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 "${git_args[@]}" ${remote} ${branch}:refs/for/${remote_branch}
- exit $?
- fi
- done
+ vr git push "${git_args[@]}" ${remote} ${branch}:refs/for/${remote_branch} && exit
err "could not figure out remote to push to"
;;
sync)