Skip to content

Commit

Permalink
Merge pull request #17259 from dkav/chk-initial-branch
Browse files Browse the repository at this point in the history
cmd/update.sh: check initial branch is not master
  • Loading branch information
MikeMcQuaid authored May 9, 2024
2 parents 9d58b79 + 85cd2f0 commit fbb73ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ EOS
then
git checkout --force "${UPSTREAM_BRANCH}" "${QUIET_ARGS[@]}"
else
if [[ -n "${UPSTREAM_TAG}" && "${UPSTREAM_BRANCH}" != "master" ]]
if [[ -n "${UPSTREAM_TAG}" && "${UPSTREAM_BRANCH}" != "master" ]] &&
[[ "${INITIAL_BRANCH}" != "master" ]]
then
git branch --force "master" "origin/master" "${QUIET_ARGS[@]}"
fi
Expand Down

0 comments on commit fbb73ba

Please # to comment.