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

Restore the shallow clone behavior of the git walkers #4

Closed
wants to merge 1 commit into from

Conversation

jcrossley3
Copy link
Owner

Resolves trustification#775

I finally figured out how to update the shallow clone, setting the fetch depth to i32::MAX to signal infinite fetch depth, per https://git-scm.com/docs/shallow

I had wrongly assumed depth=0 signaled infinite depth -- it does for an initial clone, but not an update of a shallow one.

Essentially, this improves the "day 0" experience -- the first walk of the shallow clone takes no more than a few minutes. But the annoying ~30 minute fetch is deferred to the first update of the shallow clone, effectively turning it into a deep clone, after which subsequent fetches are fast.

I think that's a workable compromise until libgit2's perf issue is addressed.

Resolves trustification#775

I finally figured out how to update the shallow clone, setting the
fetch depth to `i32::MAX` to signal infinite fetch depth, per
https://git-scm.com/docs/shallow

I had wrongly assumed depth=0 signaled infinite depth -- it does for
an initial clone, but not an update of a shallow one.

Essentially, this improves the "day 0" experience -- the first walk of
the shallow clone takes no more than a few minutes. But the annoying
~30 minute fetch is deferred to the first update of the shallow clone,
effectively turning it into a deep clone, after which subsequent
fetches are fast.

I think that's a workable compromise until libgit2's perf issue is
addressed.

Signed-off-by: Jim Crossley <[email protected]>
@jcrossley3 jcrossley3 closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't forget that the initial CVE walker's git clone takes ~30 minutes
1 participant