➜ ~ brew info test
Error: No available formula with the name \"test\"
==> Searching for a previously deleted formula...
Warning: homebrew/core is shallow clone
As of Oct 2020 Homebrew no longer creates shallow clones when being installed, and as of Dec 2020 updating existing shallow clones is not allowed either.
(This makes the original question about silencing the warning moot).
If a shallow clone is configured, a message containing the below will be shown:
Error: homebrew-core is a shallow clone. To brew update first run: git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
And/or:
Error: homebrew-cask is a shallow clone. To brew update first run: git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow
It is now required to perform the unshallow process by running the git
commands above (even without a desire for having access to the expanded history that this process provides).
For some details about the motivation for this change, see this discussion on Homebrew's GitHub page, specifically:
[Using shallow clones] places a massive computation burden on GitHub's servers, which have to dynamically compute a fresh delta between what you have and the latest commit, on every
brew update
. (With full clones, GitHub can simply send you all the commits that happened after your last pull, and your local Git client takes care of the rest.)-gromgit