Browse Source

Pull and clone with `--depth 1`.

This greatly reduces bandwidth by not retrieving the entire tree.
In theory, this would break Vim plugins that assume they're git repos
and use the tree, but in practice I've never seen this.
pull/648/head
Zemnmez 10 years ago
parent
commit
1202e61c41
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      autoload/vundle/installer.vim

+ 2
- 2
autoload/vundle/installer.vim View File

@ -407,7 +407,7 @@ func! s:make_sync_command(bang, bundle) abort
let cmd_parts = [ let cmd_parts = [
\ 'cd '.vundle#installer#shellesc(a:bundle.path()), \ 'cd '.vundle#installer#shellesc(a:bundle.path()),
\ 'git pull',
\ 'git pull --depth 1',
\ 'git submodule update --init --recursive', \ 'git submodule update --init --recursive',
\ ] \ ]
let cmd = join(cmd_parts, ' && ') let cmd = join(cmd_parts, ' && ')
@ -415,7 +415,7 @@ func! s:make_sync_command(bang, bundle) abort
let initial_sha = s:get_current_sha(a:bundle) let initial_sha = s:get_current_sha(a:bundle)
else else
let cmd = 'git clone --recursive '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path())
let cmd = 'git clone --recursive --depth 1 '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path())
let initial_sha = '' let initial_sha = ''
endif endif
return [cmd, initial_sha] return [cmd, initial_sha]


Loading…
Cancel
Save