Browse Source

Add g:vundle_git_options, allow you to pass command line options to git client.

pull/304/head
Eoghan Gaffney 13 years ago
parent
commit
3580c739bc
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      autoload/vundle/installer.vim

+ 8
- 3
autoload/vundle/installer.vim View File

@ -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


Loading…
Cancel
Save