mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-08 01:44:44 +08:00
Minor refactoring
This commit is contained in:
10
plug.vim
10
plug.vim
@@ -604,15 +604,11 @@ function! s:update_serial(pull, todo)
|
|||||||
execute 'cd '.s:esc(spec.dir)
|
execute 'cd '.s:esc(spec.dir)
|
||||||
let [valid, msg] = s:git_valid(spec, 0, 0)
|
let [valid, msg] = s:git_valid(spec, 0, 0)
|
||||||
if valid
|
if valid
|
||||||
if a:pull
|
let result = a:pull ?
|
||||||
let result =
|
|
||||||
\ s:system(
|
\ s:system(
|
||||||
\ printf('git checkout -q %s 2>&1 && git pull origin %s 2>&1 && git submodule update --init --recursive 2>&1',
|
\ printf('git checkout -q %s 2>&1 && git pull origin %s 2>&1 && git submodule update --init --recursive 2>&1',
|
||||||
\ s:shellesc(spec.branch), s:shellesc(spec.branch)))
|
\ s:shellesc(spec.branch), s:shellesc(spec.branch))) : 'Already installed'
|
||||||
let [result, error] = [result, v:shell_error != 0]
|
let error = a:pull ? v:shell_error != 0 : 0
|
||||||
else
|
|
||||||
let [result, error] = ['Already installed', 0]
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
let result = msg
|
let result = msg
|
||||||
let error = 1
|
let error = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user