Merge pull request #991 from Homebrew/brew-main

install.sh: make sure Git's default branch is `main`
This commit is contained in:
Mike McQuaid 2025-06-25 15:22:50 +01:00 committed by GitHub
commit c8f1d39043
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -943,7 +943,7 @@ ohai "Downloading and installing Homebrew..."
cd "${HOMEBREW_REPOSITORY}" >/dev/null || return
# we do it in four steps to avoid merge errors when reinstalling
execute "${USABLE_GIT}" "init" "--quiet"
execute "${USABLE_GIT}" "-c" "init.defaultBranch=main" "init" "--quiet"
# "git remote add" will fail if the remote is defined in the global config
execute "${USABLE_GIT}" "config" "remote.origin.url" "${HOMEBREW_BREW_GIT_REMOTE}"