diff --git a/build-tools/branching/create_branches_and_tags.sh b/build-tools/branching/create_branches_and_tags.sh index c71eadbd..b67ce35e 100755 --- a/build-tools/branching/create_branches_and_tags.sh +++ b/build-tools/branching/create_branches_and_tags.sh @@ -383,18 +383,19 @@ for subgit in $SUBGITS; do remote_branch=$(git_repo_remote_branch) if [ "${remote_branch}" == "" ]; then remote_branch=$(git_remote_branch) - if [ "${remote_branch}" == "" ]; then - echo_stderr "ERROR: failed to determine remote branch in ${subgit}" - exit 1 - fi + fi + + extra_args="" + if [ "${remote_branch}" != "" ]; then + extra_args="-t ${remote}/${remote_branch}" fi # check if destination branch already exists branch_check=$(git branch -a --list $branch) if [ -z "$branch_check" ]; then echo "Creating branch $branch in $subgit" - echo " git checkout -t ${remote}/${remote_branch} -b $branch" - git checkout -t ${remote}/${remote_branch} -b $branch + echo " git checkout ${extra_args} -b $branch" + git checkout ${extra_args} -b $branch if [ $? != 0 ] ; then echo_stderr "ERROR: failed to create branch '$branch' in ${subgit}" exit 1 diff --git a/build-tools/branching/push_branches_tags.sh b/build-tools/branching/push_branches_tags.sh index 4597cf6d..f55ca8d3 100755 --- a/build-tools/branching/push_branches_tags.sh +++ b/build-tools/branching/push_branches_tags.sh @@ -215,13 +215,17 @@ for subgit in $SUBGITS; do exit 1 fi - review_method=$(git_repo_review_method) - if [ "${review_method}" == "" ]; then - echo_stderr "ERROR: Failed to determine review method in ${subgit}" - exit 1 + if [ $BYPASS_GERRIT -eq 0 ]; then + review_method=$(git_repo_review_method) + if [ "${review_method}" == "" ]; then + echo_stderr "ERROR: Failed to determine review method in ${subgit}" + exit 1 + fi + else + review_method='default' fi - remote=$(git_remote) + remote=$(git_repo_remote) if [ "${remote}" == "" ]; then echo_stderr "ERROR: Failed to determine remote in ${manifest_dir}" exit 1 diff --git a/build-tools/git-repo-utils.sh b/build-tools/git-repo-utils.sh index 395a343e..31b362c4 100644 --- a/build-tools/git-repo-utils.sh +++ b/build-tools/git-repo-utils.sh @@ -24,6 +24,9 @@ source ${GIT_REPO_UTILS_DIR}/repo-utils.sh source ${GIT_REPO_UTILS_DIR}/git-utils.sh source ${GIT_REPO_UTILS_DIR}/url_utils.sh +git_remote_fp="git_repo_remote" + + # # git_repo_rel_dir [