homebrew-core is a shallow clone. 対処法

homebrew-core is a shallow clone. 対処法

2020-12-194 min read

目次

  1. homebrew-で-homebrew-core-is-a-shallow-cloneと
  2. 対処法

homebrew で homebrew-core is a shallow clone.と

homebrewでupdateしようとしたらhomebrew で homebrew-core is a shallow clone.とエラーが表示されアップデートできなかったので対処した。

事象が発生したバージョン。

Homebrew 2.6.2

表示されたエラー

$ brew update 
Error: 
  homebrew-core is a shallow clone.
  homebrew-cask is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
  git -C /usr/local/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!
$ brew --version
Homebrew 2.6.2
Homebrew/homebrew-core (git revision 842bf; last commit 2020-12-19)
Homebrew/homebrew-cask (git revision 5f9079; last commit 2020-12-19)

対処法

表示されていたコマンドをそのまま叩きました。

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
$ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
remote: Enumerating objects: 606188, done.
remote: Counting objects: 100% (606143/606143), done.
remote: Compressing objects: 100% (211292/211292), done.
remote: Total 597182 (delta 388575), reused 591642 (delta 383039), pack-reused 0
Receiving objects: 100% (597182/597182), 237.78 MiB | 8.40 MiB/s, done.
Resolving deltas: 100% (388575/388575), completed with 4057 local objects.
From https://github.com/Homebrew/homebrew-core
   842bf32214..f089a94551  master     -> origin/master
$ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
remote: Enumerating objects: 374720, done.
remote: Counting objects: 100% (374697/374697), done.
remote: Compressing objects: 100% (109259/109259), done.
remote: Total 368361 (delta 262964), reused 363940 (delta 258546), pack-reused 0
Receiving objects: 100% (368361/368361), 159.96 MiB | 8.12 MiB/s, done.
Resolving deltas: 100% (262964/262964), completed with 2778 local objects.
From https://github.com/Homebrew/homebrew-cask
   5f907917bc..ab89656927  master     -> origin/master
Tags
javascript(109)
linux(54)
node.js(53)
amazon%20aws(47)
typescript(44)
%E3%82%A2%E3%83%AB%E3%82%B4%E3%83%AA%E3%82%BA%E3%83%A0(36)
%E7%94%BB%E5%83%8F%E5%87%A6%E7%90%86(30)
html5(29)
php(24)
centos(24)
python(22)
%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0(21)
mac(21)
mysql(20)
canvas(19)
opencv(17)
%E9%9B%91%E8%AB%87(16)
docker(16)
wordpress(15)
atcoder(14)
apache(12)
%E6%A9%9F%E6%A2%B0%E5%AD%A6%E7%BF%92(12)
%E3%83%87%E3%83%BC%E3%82%BF%E3%83%99%E3%83%BC%E3%82%B9(12)
amazon%20s3(12)
red%20hat(12)
prisma(12)
ubuntu(11)
github(10)
git(10)
vue.js(10)
%E7%94%BB%E5%83%8F%E5%87%A6%E7%90%86100%E6%9C%AC%E3%83%8E%E3%83%83%E3%82%AF(10)
mariadb(10)
react(9)
aws%20cdk(9)
css3(8)
%E5%8F%AF%E8%A6%96%E5%8C%96(8)
%E5%B0%8F%E3%83%8D%E3%82%BF(8)
nestjs(8)
amazon%20lightsail(7)
next.js(7)
%E3%83%96%E3%83%AD%E3%82%B0(6)
cms(6)
oracle(6)
perl(6)
gitlab(6)
iam(5)
amazon%20ec2(5)
%E8%B3%87%E6%A0%BC%E8%A9%A6%E9%A8%93(5)
aws%20amplify(5)
curl(4)
Author
githubzennqiita
ただの備忘録です。

※外部送信に関する公表事項