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
Add support for git shallow clones #3449
Comments
the issue with a clone depth of 1 is that the locked commit may not be the latest commit of the repo. If the depth is not high enough to reach the locked commit, the installation will not work. And there is no way to find a value of depth working everywhere (it is easy to create a case requiring more than this value: just add more commit after the locked one in the repo) |
A similar state to a shallow clone can be to git init, set remote, fetch desired sha. |
Interesting idea @slbmeh. That would avoid limitations of shallow clones. Do you know the command to run to fetch only the desired commit ? |
@GromNaN you can fetch any treeish object so just fetch the hash directly |
actually, it doesn't appear to work like that anymore... i'll do further investigation, i was sure it worked for me like that git 1.6 era or so... there's a way to do it with the plumbing rather than the porcelain commands |
Please check #4961 |
any updates on this? |
I think this isn't as needed anymore now that we clone from the cache dir, so we do local clones which are pretty fast. |
This issue should be reopened. For CI/CD purpose or docker/kubernetes world where we start always from clean scratch there is no shared cache and for more complex project it's a waste of time to get all full repositories instead what is needed. |
@hetii Wouldn’t your problem be solved with --prefer-dist? |
@ondrejmirtes yes indeed If your private packagist isn't building If your private packagist is mirroring a private GitHub (or BitBucket?) instance, you may just need to edit your private packagist's |
When working with a large repository it would be nice to opt for a clone depth of 1 to still leverage git to patch dependencies for a project
The text was updated successfully, but these errors were encountered: