-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Optimize git clone for large repositories #1778
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
Conversation
|
This helps but doing a git clone at all is pretty rough on performance for larger repositories. It ends up copying parts of the |
|
https://github.com/Kentzo/git-archive-all Maybe useful? |
|
Yeah after I looked to see what other things were happening that I wasn't hitting this PR won't work particularly well. For example the |
|
A |
|
We can depend on whatever we want if it provides improved "something" imo. We do that for nginx for instance. |
11f57b1 to
00563a2
Compare
|
I've pushed an update that seems to work well and dramatically speeds up my builds on larger repositories. |
|
Thats pretty clever. |
|
I'm not super familiar with git submodules but I think this approach may still clone the entire submodule. Using |
|
Does this hamstring us from doing rollbacks later? |
|
I'm not sure what you mean but afaict these are tmp folders so they will be gone after reboot at the least so if any plugins are relying on them sticking around they're gonna have a bad time. The code is already doing a |
|
👍 on what @mmerickel said. I'm not sure how this would hurt anything, so long as the state of the original git repo stays as is. |
|
My first glance was cursory at best. Looking more closely, this just puts the one ref into the container, yes? |
|
We could delete the ref inside that new copy of the branch, no? |
|
Are you referring to the temporary tag as the ref being injected? I could add a line to delete the ref, but again the |
|
I think this is fine as is. I was merely confirming what I was reading. |
|
Tests should pass now. Please rebase. |
c3ea491 to
e2e5536
Compare
It's not possible to checkout a specific commit into a new repository using ``git fetch`` and so a temporary tag is added to the host repository, then fetched.
e2e5536 to
d31ac73
Compare
|
Things should be good after these tests finish running. |
|
Gave it the old college test locally. lgtm 👍 |
optimize git clone for building using depth=1
|
This seems to fail for repositories where submodules are not at HEAD due to the added |
avoid copying the entire git repo to a tmp folder when building the app