1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:40:04 +08:00
This commit is contained in:
wsdjeg 2017-04-12 21:15:51 +08:00
parent ed1ea6a97f
commit dde53099a0

View File

@ -246,6 +246,11 @@ function! s:on_install_stdout(id, data, event) abort
endfunction
" @vimlint(EVL103, 0, a:event)
function! s:lock_revision(repo) abort
let cmd = ['git', 'checkout', '-C', a:repo.path, 'a:repo.rev']
call s:VIM_CO.system(cmd)
endfunction
" here if a:data == 0, git pull succeed
function! s:on_install_exit(id, data, event) abort
if a:data == 0 && a:event ==# 'exit'
@ -255,6 +260,9 @@ function! s:on_install_exit(id, data, event) abort
endif
call s:set_buf_line(s:plugin_manager_buffer, 1, 'Installing plugins (' . s:pct . '/' . s:total . ')')
call s:set_buf_line(s:plugin_manager_buffer, 2, s:status_bar())
if get(s:pulling_repos[a:id], 'rev', '') !=# ''
call s:lock_revision(s:pulling_repos[a:id])
endif
call remove(s:pulling_repos, string(a:id))
if !empty(s:plugins)
call s:install(dein#get(s:LIST.shift(s:plugins)))