Merge pull request #17259 from dkav/chk-initial-branch

cmd/update.sh: check initial branch is not master
This commit is contained in:
Mike McQuaid 2024-05-09 08:42:24 +01:00 committed by GitHub
commit fbb73ba1ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,7 +266,8 @@ EOS
then then
git checkout --force "${UPSTREAM_BRANCH}" "${QUIET_ARGS[@]}" git checkout --force "${UPSTREAM_BRANCH}" "${QUIET_ARGS[@]}"
else else
if [[ -n "${UPSTREAM_TAG}" && "${UPSTREAM_BRANCH}" != "master" ]] if [[ -n "${UPSTREAM_TAG}" && "${UPSTREAM_BRANCH}" != "master" ]] &&
[[ "${INITIAL_BRANCH}" != "master" ]]
then then
git branch --force "master" "origin/master" "${QUIET_ARGS[@]}" git branch --force "master" "origin/master" "${QUIET_ARGS[@]}"
fi fi