Loading snippets/basop/get-float-ref-branch-name.sh +9 −2 Original line number Diff line number Diff line Loading @@ -46,10 +46,17 @@ branchname_out="main" # Replace only the first occurrence, as "basop" may be present in the later description # If the format is correct, then before "_basop", only numbers can occur float_ref_branchname="${branchname_in/basop/ref}" git_result=$(git branch -a) # now check in ivas-codec repository if a branch with this name exits exit_code_ls_remote=0 pushd "${SCRIPTS_DIR}" git fetch origin git ls-remote --exit-code --heads origin res/heads/$float_ref_branchname || exit_code_ls_remote=$? popd # If the branch does not exist, default to "ivas-float-update" if [[ "$git_result" =~ "$float_ref_branchname" ]]; then # NOTE: "git ls-remote --exit-code" returns 2 if the given ref was not found if [ "$exit_code_ls_remote" -eq "2" ]; then branchname_out="${float_ref_branchname}" fi Loading Loading
snippets/basop/get-float-ref-branch-name.sh +9 −2 Original line number Diff line number Diff line Loading @@ -46,10 +46,17 @@ branchname_out="main" # Replace only the first occurrence, as "basop" may be present in the later description # If the format is correct, then before "_basop", only numbers can occur float_ref_branchname="${branchname_in/basop/ref}" git_result=$(git branch -a) # now check in ivas-codec repository if a branch with this name exits exit_code_ls_remote=0 pushd "${SCRIPTS_DIR}" git fetch origin git ls-remote --exit-code --heads origin res/heads/$float_ref_branchname || exit_code_ls_remote=$? popd # If the branch does not exist, default to "ivas-float-update" if [[ "$git_result" =~ "$float_ref_branchname" ]]; then # NOTE: "git ls-remote --exit-code" returns 2 if the given ref was not found if [ "$exit_code_ls_remote" -eq "2" ]; then branchname_out="${float_ref_branchname}" fi Loading