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

feat: use shallow git clone and shallow submodule clone #6348

Closed
wants to merge 5 commits into from

Conversation

roelofvandijk
Copy link

@roelofvandijk roelofvandijk commented Sep 2, 2022

Pull Request Check List

Resolves: #2412
Relates to: #2094

This should speed up git clone for all large repositories.

I am unsure what extra tests would be required for this.
I am also not sure if there is any case in which a non-shallow clone of a repository would be required, for instance if tags are needed.

Note that --depth 1 automatically implies --single-branch per the git docs.

  • Added tests for changed code.
  • Updated documentation for changed code.

@roelofvandijk
Copy link
Author

It seems like the --depth parameter is not recognized by the git command that is used in the tests. Is this a (very) old version of git? That could also cause some slowness for git clone.

@neersighted
Copy link
Member

I'm not 100% sure this is something universally desirable to apply, and it will be need to done to Dulwich as well as the system git client. There should also be some fallback if it is not supported.

@neersighted neersighted added area/installer Related to the dependency installer kind/enhancement Not a bug or feature, but improves usability or performance status/1-design-review impact/changelog Requires a changelog entry impact/docs Contains or requires documentation changes labels Sep 3, 2022
@mtkennerly
Copy link

I have a plugin that does VCS-based dynamic versioning, and this would break the handling for dependencies that also use the plugin. If you make this the default, please also add an option for Git dependencies to specify a custom depth, including the full history. For example:

[tool.poetry.dependencies]
requests = { git = "https://github.com/requests/requests.git", depth = 0 }

Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/installer Related to the dependency installer impact/changelog Requires a changelog entry impact/docs Contains or requires documentation changes kind/enhancement Not a bug or feature, but improves usability or performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install from git may be slow when cloning huge repository
3 participants