-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Reduce data it downloads #122
Comments
I've heard about shallow clone, but not sparse checkout. So how do I do it? Could you give me an example command? I haven't tried to add For Rust, you really should check out this repository, I myself use this one: |
Here is an example of using a sparse checkout: git init rust-vim
cd rust-vim
git remote add origin https://github.com/rust-lang/rust.git
git config core.sparsecheckout true
echo "src/etc/vim/" >> .git/info/sparse-checkout
git pull origin master And you are right that shallow does is not really needed but isn't it really simple to add? You just need to use |
And you need to combine both methods because otherwise the .git directory still contains a lot of data. In this example it still contains 192M. But if you do a shallow clone and a sparse checkout at the same time the directory contains 7.6M. You just need to pull like this: |
Be aware of the issues regarding shallow clone, look at this comments: gmarik/Vundle.vim#28 I have a question regarding the sparse checkout what would happen if I have a plug in like: Plug 'user/plugin', { 'rtp': '/some/path/vim' } and a script in this plugin depends on some other file in |
@Tranquility @vheon Thanks for the info. Unfortunately using sparse checkout seems more complex than I imagined, and like @vheon, I'm also worried about subtle compatibility issues on some plugins. So I think I'm leaning towards not supporting it, not as the default, and not even as an optional feature in the spirit of simplicity, considering that there are very few cases that this might actually make a difference. (As I mentioned in the previous comment, https://github.com/wting/rust.vim easily solves the issue for Rust.) Shallow cloning option still sounds very tempting, but the issues shown in the link @vheon provided make me worry. I've read some comments but I still haven't figured out what exactly the problem is and what would be the solution if there's any. |
Closing by #218. |
The patch was reverted. The discussion will continue on #217. |
You can use sparse checkouts (to download only the directory specified in "rtp") and shallow clone (to not download the full history) to drastically reduce the data it needs to download.
This is especially important with big repositories like rust. For exacmple:
The text was updated successfully, but these errors were encountered: