-
Notifications
You must be signed in to change notification settings - Fork 31
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
Clone the parser with specific depth to reduce network traffic #821
Comments
Do you see any reason not to clone with depth exactly 1 all the time, rather than adding an option? |
Actually after some searching, I think |
According to this github blog post, I think we do want a shallow clone ( According to the post, if we just want to download the content of HEAD, then we can use a shallow clone (although it is the more restricted form of the three, as many normal git commands don't work anymore on such repos - however I don't think we care in the case of Topiary). |
I think |
You have to provide a Git rev, so I don't think this would be an issue as you'd always pin to a known working commit. |
@Xophmeister That is not the case if |
Oh, I think you're right, my bad. Shallow clone just works with HEAD, although there are hacky work-arounds to get the range of HEAD down to a specific revision (but then I guess you get everything, including trees and blobs, which makes it noncompetitive). Then maybe tree-less is the way to go then, where checking out the revision will lazily download what's needed? |
Ah, my mistake: You can only do that with branches 😞 |
tree-less and blob-less are both Ok and similar in size according to my test, actually also close to |
Also, I concur with @aspiwack 's suggestion: I would just make any light clone we choose to be the default silently, as users aren't supposed to mess with downloaded repo manually anyway. It's more like a Topiary implementation detail. |
Problem
The size of the whole git history can be large (parser.c changes a lot if tracked)
git clone --depth 1
can reduce a lot of unnecessary network trafficDescribe the solution you'd like
extra option named
depth
in nickeland add something like
to
topiary/topiary-config/src/language.rs
Lines 222 to 227 in f35eee4
Also, it would be nice to have another topiary-cli subcommand to clean the historical versions of the compiled
.so
files.The text was updated successfully, but these errors were encountered: