diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 8386aae..edc0b52 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -212,17 +212,22 @@ endf func! s:sync(bang, bundle) abort let git_dir = expand(a:bundle.path().'/.git/', 1) + let git_cmd = 'git' + if exists("g:vundle_git_options") + let git_cmd = git_cmd.' '.g:vundle_git_options + echo git_cmd + endif if isdirectory(git_dir) || filereadable(expand(a:bundle.path().'/.git', 1)) if !(a:bang) | return 'todate' | endif - let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull && git submodule update --init --recursive' + let cmd = 'cd '.shellescape(a:bundle.path()).' && '.git_cmd.' pull && '.git_cmd.' submodule update --init --recursive' let cmd = g:shellesc_cd(cmd) - let get_current_sha = 'cd '.shellescape(a:bundle.path()).' && git rev-parse HEAD' + let get_current_sha = 'cd '.shellescape(a:bundle.path()).' && '.git_cmd.' rev-parse HEAD' let get_current_sha = g:shellesc_cd(get_current_sha) let initial_sha = s:system(get_current_sha)[0:15] else - let cmd = 'git clone --recursive '.shellescape(a:bundle.uri).' '.shellescape(a:bundle.path()) + let cmd = git_cmd.' clone --recursive '.shellescape(a:bundle.uri).' '.shellescape(a:bundle.path()) let initial_sha = '' endif