Do not use --progress option when not necessary

Patch suggested by @sangh. Fix #162 and #163.
This commit is contained in:
Junegunn Choi 2015-02-09 12:12:50 +09:00
parent f825e4ef6e
commit 71542dd896

View file

@ -914,6 +914,7 @@ while 1 " Without TCO, Vim stack is bound to explode
let spec = remove(s:update.todo, name)
let pull = s:update.pull
let new = !isdirectory(spec.dir)
let prog = s:nvim ? '--progress' : ''
call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...')
redraw
@ -923,8 +924,8 @@ while 1 " Without TCO, Vim stack is bound to explode
if valid
if pull
call s:spawn(name,
\ printf('(git fetch --progress 2>&1 && git checkout -q %s 2>&1 && git merge --ff-only origin/%s 2>&1 && git submodule update --init --recursive 2>&1)',
\ s:shellesc(spec.branch), s:shellesc(spec.branch)), { 'dir': spec.dir })
\ printf('(git fetch %s 2>&1 && git checkout -q %s 2>&1 && git merge --ff-only origin/%s 2>&1 && git submodule update --init --recursive 2>&1)',
\ prog, s:shellesc(spec.branch), s:shellesc(spec.branch)), { 'dir': spec.dir })
else
let s:jobs[name] = { 'running': 0, 'result': 'Already installed', 'error': 0 }
endif
@ -933,7 +934,8 @@ while 1 " Without TCO, Vim stack is bound to explode
endif
else
call s:spawn(name,
\ printf('git clone --progress --recursive %s -b %s %s 2>&1',
\ printf('git clone %s --recursive %s -b %s %s 2>&1',
\ prog,
\ s:shellesc(spec.uri),
\ s:shellesc(spec.branch),
\ s:shellesc(s:trim(spec.dir))), { 'new': 1 })