From 1017d40e852f0f8ce10c394ab8993839aaff2e8a Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 29 Dec 2012 13:17:16 +0800 Subject: [PATCH] Do shallow clone & pull --- 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 e7f816c..caf7ee0 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -205,14 +205,14 @@ func! s:sync(bang, bundle) abort if isdirectory(git_dir) || filereadable(expand(a:bundle.path().'/.git', 1)) if !(a:bang) | return 'todate' | endif let cmd = g:shellesc_cd('cd '.bundle_path) - let cmd .= ' && git pull' + let cmd .= ' && git pull --depth=1' let cmd .= ' && git submodule update --init --recursive' let get_current_sha = g:shellesc_cd('cd '.bundle_path) let get_current_sha .= ' && git rev-parse HEAD' let initial_sha = system(get_current_sha)[0:15] else - let cmd = 'git clone --recursive '.shellescape(a:bundle.uri).' '.bundle_path + let cmd = 'git clone --depth=1 --recursive '.shellescape(a:bundle.uri).' '.bundle_path let initial_sha = '' endif