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

Support for git fetch depth #217

Open
sirnewton01 opened this issue Mar 7, 2019 · 1 comment
Open

Support for git fetch depth #217

sirnewton01 opened this issue Mar 7, 2019 · 1 comment

Comments

@sirnewton01
Copy link
Collaborator

Go get will sometimes fetch an individual commit so that it can get the snapshot of the files from it. In this case there's no need to fetch the entire git history. Dgit currently fetches all of the commits leading up to that commit incurring the costs of that in terms of disk space and time.

It would be a tremendous performance optimization if dgit would support the depth parameter and allow the shallow fetch of just that commit.

Since the commits would no longer be guaranteed to have all of their preceding commits there would need to be some additional checking for "grafted" commits in git log. Note that when there's a grafted commit the git log should show the keyword "grafted" in the list of ref names in brackets ().

@driusan
Copy link
Owner

driusan commented Mar 9, 2019

If we support this, we probably also need to support --deepen. Since it's mostly the remote that's responsible for calculating the objects and we don't use our own git-upload-pack implementation, I think most of the work is in reading the pack protocol documentation and figuring out where to insert the right line as part of the negotiation and determining whether it depends on any capabilities being advertised by the remote, or if it's always available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants