Merge pull request #13983 from gromgit/force-symlinks

update*: enforce sane symlinks setting
This commit is contained in:
Mike McQuaid 2022-10-10 12:53:37 +01:00 committed by GitHub
commit e89ae3c84d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -56,6 +56,8 @@ homebrew-update-reset() {
opoo "No remote 'origin' in ${DIR}, skipping update and reset!"
continue
fi
git -C "${DIR}" config --bool core.autocrlf false
git -C "${DIR}" config --bool core.symlinks true
ohai "Fetching ${DIR}..."
git -C "${DIR}" fetch --force --tags origin
git -C "${DIR}" remote set-head origin --auto >/dev/null

View File

@ -45,6 +45,7 @@ git_init_if_necessary() {
trap '{ rm -rf .git; exit 1; }' EXIT
git init
git config --bool core.autocrlf false
git config --bool core.symlinks true
if [[ "${HOMEBREW_BREW_DEFAULT_GIT_REMOTE}" != "${HOMEBREW_BREW_GIT_REMOTE}" ]]
then
echo "HOMEBREW_BREW_GIT_REMOTE set: using ${HOMEBREW_BREW_GIT_REMOTE} for Homebrew/brew Git remote URL."
@ -67,6 +68,7 @@ git_init_if_necessary() {
trap '{ rm -rf .git; exit 1; }' EXIT
git init
git config --bool core.autocrlf false
git config --bool core.symlinks true
if [[ "${HOMEBREW_CORE_DEFAULT_GIT_REMOTE}" != "${HOMEBREW_CORE_GIT_REMOTE}" ]]
then
echo "HOMEBREW_CORE_GIT_REMOTE set: using ${HOMEBREW_CORE_GIT_REMOTE} for Homebrew/core Git remote URL."
@ -269,7 +271,10 @@ EOS
export HOMEBREW_UPDATE_BEFORE"${TAP_VAR}"="${INITIAL_REVISION}"
# ensure we don't munge line endings on checkout
git config core.autocrlf false
git config --bool core.autocrlf false
# make sure symlinks are saved as-is
git config --bool core.symlinks true
if [[ "${DIR}" == "${HOMEBREW_CORE_REPOSITORY}" && -n "${HOMEBREW_LINUXBREW_CORE_MIGRATION}" ]]
then