Update Library/Homebrew/cmd/update.sh

Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
This commit is contained in:
J Rob Gant 2020-12-11 19:27:54 -05:00 committed by GitHub
parent 68e2e48b63
commit 54546c5f8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,18 +396,18 @@ EOS
if [[ -n $HOMEBREW_CORE_SHALLOW || -n $HOMEBREW_CASK_SHALLOW ]]
then
odie <<EOS
${HOMEBREW_CORE_SHALLOW:+
homebrew-core is a shallow clone.}${HOMEBREW_CASK_SHALLOW:+
homebrew-cask is a shallow clone.}
To \`brew update\`, first run:${HOMEBREW_CORE_SHALLOW:+
git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" fetch --unshallow}${HOMEBREW_CASK_SHALLOW:+
git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask" fetch --unshallow}
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
${HOMEBREW_CORE_SHALLOW:+
homebrew-core is a shallow clone.}${HOMEBREW_CASK_SHALLOW:+
homebrew-cask is a shallow clone.}
To \`brew update\`, first run:${HOMEBREW_CORE_SHALLOW:+
git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" fetch --unshallow}${HOMEBREW_CASK_SHALLOW:+
git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask" fetch --unshallow}
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
EOS
fi