Skip to content

Commit 2ee69b3

Browse files
committed
install.sh: Homebrew/core uses main default branch.
`master` is still around so it will keep working but let's do things nicely here.
1 parent 5585534 commit 2ee69b3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,15 +992,16 @@ ohai "Downloading and installing Homebrew..."
992992
execute "${MKDIR[@]}" "${HOMEBREW_CORE}"
993993
cd "${HOMEBREW_CORE}" >/dev/null || return
994994

995-
execute "${USABLE_GIT}" "-c" "init.defaultBranch=master" "init" "--quiet"
995+
execute "${USABLE_GIT}" "init" "--quiet"
996996
execute "${USABLE_GIT}" "config" "remote.origin.url" "${HOMEBREW_CORE_GIT_REMOTE}"
997997
execute "${USABLE_GIT}" "config" "remote.origin.fetch" "+refs/heads/*:refs/remotes/origin/*"
998+
execute "${USABLE_GIT}" "config" "--bool" "fetch.prune" "true"
998999
execute "${USABLE_GIT}" "config" "--bool" "core.autocrlf" "false"
9991000
execute "${USABLE_GIT}" "config" "--bool" "core.symlinks" "true"
10001001
retry 5 "${USABLE_GIT}" "fetch" "--force" "${quiet_progress[@]}" \
1001-
"origin" "refs/heads/master:refs/remotes/origin/master"
1002+
"origin" "refs/heads/main:refs/remotes/origin/main"
10021003
execute "${USABLE_GIT}" "remote" "set-head" "origin" "--auto" >/dev/null
1003-
execute "${USABLE_GIT}" "reset" "--hard" "origin/master"
1004+
execute "${USABLE_GIT}" "reset" "--hard" "origin/main"
10041005

10051006
cd "${HOMEBREW_REPOSITORY}" >/dev/null || return
10061007
) || exit 1

0 commit comments

Comments
 (0)