File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -252,13 +252,12 @@ EOS
252
252
fi
253
253
254
254
INITIAL_BRANCH=" $( git symbolic-ref --short HEAD 2> /dev/null) "
255
- SOFT_DELETE_MASTER =
255
+ MAIN_MIGRATION_REQUIRED =
256
256
if [[ " ${INITIAL_BRANCH} " == " master" &&
257
257
(" ${DIR} " == " ${HOMEBREW_REPOSITORY} " || " ${DIR} " == " ${HOMEBREW_CORE_REPOSITORY} " || " ${DIR} " == " ${HOMEBREW_CASK_REPOSITORY} " ) ]]
258
258
then
259
259
# Migrate master to main for Homebrew/brew, homebrew-core or homebrew-cask
260
- INITIAL_BRANCH=" main"
261
- SOFT_DELETE_MASTER=" 1"
260
+ MAIN_MIGRATION_REQUIRED=" 1"
262
261
fi
263
262
264
263
if [[ -n " ${UPSTREAM_TAG} " ]] ||
326
325
327
326
if [[ -n " ${HOMEBREW_NO_UPDATE_CLEANUP} " ]]
328
327
then
329
- if [[ " ${INITIAL_BRANCH} " != " ${UPSTREAM_BRANCH} " && -n " ${INITIAL_BRANCH} " ]] &&
328
+ if [[ -z " ${MAIN_MIGRATION_REQUIRED} " && " ${INITIAL_BRANCH} " != " ${UPSTREAM_BRANCH} " && -n " ${INITIAL_BRANCH} " ]] &&
330
329
[[ ! " ${INITIAL_BRANCH} " =~ ^v[0-9]+\. [0-9]+\. [0-9]| stable$ ]]
331
330
then
332
331
git checkout " ${INITIAL_BRANCH} " " ${QUIET_ARGS[@]} "
337
336
pop_stash_message
338
337
fi
339
338
340
- if [[ " ${SOFT_DELETE_MASTER} " == 1 && -n " $( git config branch.main.remote 2> /dev/null || true) " ]]
339
+ if [[ -n " ${MAIN_MIGRATION_REQUIRED} " && -n " $( git config branch.main.remote 2> /dev/null || true) " ]]
341
340
then
342
341
git branch -d " ${QUIET_ARGS[@]} " master
343
342
fi
You can’t perform that action at this time.
0 commit comments