cmd/update.sh: check initial branch is not master
Check that the initial branch is not 'master' before doing a forced update on 'master'. Git will fail with fatal error otherwise.
This commit is contained in:
parent
21e130056a
commit
85cd2f075e
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user