How to remove the shallow clone warning from HomeBrew

后端 未结 3 2015
无人共我
无人共我 2020-12-31 05:22
➜  ~ brew info test 
Error: No available formula with the name \"test\" 
==> Searching for a previously deleted formula...
Warning: homebrew/core is shallow clone         


        
3条回答
  •  醉酒成梦
    2020-12-31 06:06

    Under the cover Homebrew uses Git for version control, and a shallow clone is one that doesn't contain all history revisions/commits, for efficiency and data volume.

    Actually, in most cases the warning can be safely ignored, as the formulae being searched for probably isn't available.

    But if you're really looking for some formulae which might existed in the past, Just do what it suggests:

    To get complete history run:

    git -C "$(brew --repo homebrew/core)" fetch --unshallow
    

    This way Homebrew could search for formula that existed only in the past but removed at some point.

提交回复
热议问题