Browse Source

Added support for g:Vundle_no_full_repo option: do not store .git for each bundle (will make update no-op)

pull/86/head
Oleg Kostyuk 15 years ago
parent
commit
d3bd407069
2 changed files with 21 additions and 5 deletions
  1. +3
    -0
      autoload/vundle/config.vim
  2. +18
    -5
      autoload/vundle/installer.vim

+ 3
- 0
autoload/vundle/config.vim View File

@ -9,6 +9,9 @@ func! vundle#config#init()
if !exists('g:vundles') | let g:vundles = [] | endif
call s:rtp_rm_a()
let g:vundles = []
if !exists('g:Vundle_no_full_repo')
let g:Vundle_no_full_repo=0
endif
endf
func! vundle#config#require(vundles) abort


+ 18
- 5
autoload/vundle/installer.vim View File

@ -198,11 +198,24 @@ func! s:sync(bang, vundle) abort
let cmd = 'git clone '.a:vundle.uri.' '.shellescape(a:vundle.path())
endif
let out = s:system(cmd)
call s:log('')
call s:log('Vundle '.a:vundle.name_spec)
call s:log('$ '.cmd)
call s:log('> '.out)
if (g:Vundle_no_full_repo) && (isdirectory(expand(a:vundle.path())))
let cmd = 'rm -rf '.shellescape(git_dir)
let tmp = s:system(cmd)
call s:log('')
call s:log('Vundle '.a:vundle.name_spec)
call s:log('# update skipped because of Vundle_no_full_repo')
let out = 'up-to-date'
else
let out = s:system(cmd)
call s:log('')
call s:log('Vundle '.a:vundle.name_spec)
call s:log('$ '.cmd)
call s:log('> '.out)
if (g:Vundle_no_full_repo)
let cmd = 'rm -rf '.shellescape(git_dir)
let tmp = s:system(cmd)
endif
endif
if 0 != v:shell_error
return 'error'


Loading…
Cancel
Save