-
Notifications
You must be signed in to change notification settings - Fork 188
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
[Feature Request] Use shallow clone for git repositories #129
Comments
* use shallow clone for git repositories by default * remove trailing spaces
Hey thanks for the suggestion and PR! I agree that it would be great to have Until that is resolved, imo it's safer to keep the current approach, enabling |
According to this answer https://stackoverflow.com/questions/31278902/how-to-shallow-clone-a-specific-commit-with-depth-1 clone with Maybe making |
Shallow fetching an actual git tag seems to work afaict, perhaps we can enable shallow clones by default behaviour when we detect the |
A wonderful idea. And maybe it is easier to identify out a hash from tag/branch value, because commit hash has fixed length and contains no characters other than hex digits. While tags from different projects could use varied formats. E.g for standalone ASIO, its release tag is in the form of |
@TheLartians Hi, I just made another commit on enabling shallow clone conditionally. Could you please review the commits when you are free? Any suggestion is welcome |
* Use shallow clone for git repositories by default (#129) * use shallow clone for git repositories by default * remove trailing spaces * Enable shallow clone for actual tags * Support short commit hash * Enable shallow only when downloading dependencies into cache * Always honor user specified GIT_SHALLOW opiton
Feature added in #130. |
CPM currently clones full history for git-repository dependencies, which takes more time than necessary (in most cases) on downloading, and consumes more disk space.
Maybe use git shallow clone by default for those dependencies?
There is a
GIT_SHALLOW
option to enable--depth=1
with clone, which does what we exactly desire.If I may, I would like to make a PR on it, :-)
The text was updated successfully, but these errors were encountered: