Browse Source

make clone depth configurable

pull/29/head
Dmitri Iouchtchenko 15 years ago
parent
commit
0f9aaee3a0
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      autoload/vundle/installer.vim

+ 13
- 1
autoload/vundle/installer.vim View File

@ -67,7 +67,19 @@ func! s:sync(bang, bundle) abort
if !(a:bang) | return 0 | endif
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
else
let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
let cmd = 'git clone '
if has_key(a:bundle, 'depth')
let depth = a:bundle.depth
elseif exists('g:vundle_depth')
let depth = g:vundle_depth
else
" Clone as little as possible by default.
let depth = 1
endif
if depth > 0
let cmd .= '--depth '.depth.' '
endif
let cmd .= a:bundle.uri.' '.shellescape(a:bundle.path())
endif
silent exec '!'.cmd
return 1


Loading…
Cancel
Save