Merge pull request #10168 from Rylan12/shallow-clone-message

update: add notice that unshallowing takes time
This commit is contained in:
Rylan Polster 2020-12-30 15:10:25 -05:00 committed by GitHub
commit 4186cd94a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -392,6 +392,14 @@ EOS
[[ -f "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core/.git/shallow" ]] && HOMEBREW_CORE_SHALLOW=1 [[ -f "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core/.git/shallow" ]] && HOMEBREW_CORE_SHALLOW=1
[[ -f "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask/.git/shallow" ]] && HOMEBREW_CASK_SHALLOW=1 [[ -f "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask/.git/shallow" ]] && HOMEBREW_CASK_SHALLOW=1
if [[ -n $HOMEBREW_CORE_SHALLOW && -n $HOMEBREW_CASK_SHALLOW ]]
then
SHALLOW_COMMAND_PHRASE="These commands"
SHALLOW_REPO_PHRASE="repositories"
else
SHALLOW_COMMAND_PHRASE="This command"
SHALLOW_REPO_PHRASE="repository"
fi
if [[ -n $HOMEBREW_CORE_SHALLOW || -n $HOMEBREW_CASK_SHALLOW ]] if [[ -n $HOMEBREW_CORE_SHALLOW || -n $HOMEBREW_CASK_SHALLOW ]]
then then
@ -402,6 +410,7 @@ ${HOMEBREW_CORE_SHALLOW:+
To \`brew update\`, first run:${HOMEBREW_CORE_SHALLOW:+ 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-core" fetch --unshallow}${HOMEBREW_CASK_SHALLOW:+
git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask" fetch --unshallow} git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask" fetch --unshallow}
${SHALLOW_COMMAND_PHRASE} may take a few minutes to run due to the large size of the ${SHALLOW_REPO_PHRASE}.
This restriction has been made on GitHub's request because updating shallow 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 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 Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you