-
Notifications
You must be signed in to change notification settings - Fork 230
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
A pub git references that specifies a specific ref
does an entire git clone
#2686
Comments
Checking out a single ref would also get the entire history leading to that ref (as I understand it). I think what we should be using is a shallow clone: https://linuxhint.com/git-shallow-clone-and-clone-depth/ . I wonder if it has any downsides (will it be more expensive to change the ref?) @jonasfj WDYT? |
I think this is nice to have.. we already do some caching, so the second time you use the same repo, it's not cloned again. |
I think shallow clone is the way to go for this. At my company we are currently combining unity with flutter through https://pub.dev/packages/flutter_unity_widget and we host the unity widget dependency on a git repo. It gets big really quickly and we have to keep deleting tags. Can someone point out where this logic is currently done? Happy to take a stab at it and submit a PR. |
Any update on this? |
closing this in favor of #3556 |
e.g. the following:
ends up doing:
Which goes on to fetch the entire history of a very large repository when all I'll really need is a specific ref. As of this writing, it results in cloning multiple gigabytes of data into my .pub-cache which I will have to manually clean up, and takes over a minute to complete.
This would be multitudes more efficient if it did something like:
It should be faster.
The text was updated successfully, but these errors were encountered: