From 1202e61c4123a1e5917c08f7f46a422173651fcc Mon Sep 17 00:00:00 2001 From: Zemnmez Date: Tue, 22 Sep 2015 20:00:32 +0100 Subject: [PATCH] Pull and clone with `--depth 1`. This greatly reduces bandwidth by not retrieving the entire tree. In theory, this would break Vim plugins that assume they're git repos and use the tree, but in practice I've never seen this. --- autoload/vundle/installer.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 472271a..5a939ed 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -407,7 +407,7 @@ func! s:make_sync_command(bang, bundle) abort let cmd_parts = [ \ 'cd '.vundle#installer#shellesc(a:bundle.path()), - \ 'git pull', + \ 'git pull --depth 1', \ 'git submodule update --init --recursive', \ ] let cmd = join(cmd_parts, ' && ') @@ -415,7 +415,7 @@ func! s:make_sync_command(bang, bundle) abort let initial_sha = s:get_current_sha(a:bundle) else - let cmd = 'git clone --recursive '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path()) + let cmd = 'git clone --recursive --depth 1 '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path()) let initial_sha = '' endif return [cmd, initial_sha]