Merge pull request #9501 from rgant/double-shallow-clone-check
Check for both shallow clones at the same time.
This commit is contained in:
commit
77561fccc2
@ -390,29 +390,24 @@ EOS
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core/.git/shallow" ]]
|
||||
then
|
||||
odie <<EOS
|
||||
homebrew-core is a shallow clone. To \`brew update\` first run:
|
||||
git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" 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. 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
|
||||
[[ -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
|
||||
|
||||
if [[ -f "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask/.git/shallow" ]]
|
||||
if [[ -n $HOMEBREW_CORE_SHALLOW || -n $HOMEBREW_CASK_SHALLOW ]]
|
||||
then
|
||||
odie <<EOS
|
||||
homebrew-cask is a shallow clone. To \`brew update\` first run:
|
||||
git -C "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask" fetch --unshallow
|
||||
${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-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/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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user