Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloning repo with depth 1 on installation #11693

Closed
Quantalabs opened this issue Jul 11, 2021 · 1 comment
Closed

Cloning repo with depth 1 on installation #11693

Quantalabs opened this issue Jul 11, 2021 · 1 comment
Labels
features New features outdated PR was locked due to age

Comments

@Quantalabs
Copy link

Provide a detailed description of the proposed feature

Instead of cloning the homebrew repo as:

git clone https://github.com/Homebrew/brew

or the core repo, cloning with depth 1 will make the installation quicker:

git clone https://github.com/Homebrew/brew --depth=1

What is the motivation for the feature?

After installing homebrew 2 times, I've been frustrated by the long time it takes to install, the longest of which was the cloning of the homebrew/core repo.

How will the feature be relevant to at least 90% of Homebrew users?

It will be very relevant as new users will have a quick installation, and updates for existing users will be faster and easier.

What alternatives to the feature have been considered?

Manually installing, perhaps? However when I tried this homebrew updated, and took forever to update while cloning the homebrew/core repo.

@Quantalabs Quantalabs added the features New features label Jul 11, 2021
@Rylan12
Copy link
Member

Rylan12 commented Jul 11, 2021

We intentionally do not support shallow clones per a request from GitHub. While shallow clones are faster for the initial clone step, each fetch (i.e. brew update run) will take much longer and be much more computationally expensive for GitHub's servers.

If you must have a shallow clone, manual installation is the only option (and you'll need to manually clone the homebrew/core repo). Also, if you choose to do this, brew update will not be able to update Homebrew and its taps; you'll need to manually update them using git. Note, though, that we are in the process of removing the need to have the homebrew/core (and, eventually, homebrew/cask) repo(s) downloaded locally which will speed up the installation process and future brew update runs.

See #7050 and #10557, among others. You may also find these GitHub blog posts to be helpful in understanding why this is the case: Get up to speed with partial clone and shallow clone and Git clone: a data-driven study on cloning behaviors

@Rylan12 Rylan12 closed this as completed Jul 11, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label Aug 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
features New features outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

2 participants