Преглед изворни кода

Do not use --progress option when not necessary

Patch suggested by @sangh. Fix #162 and #163.
Junegunn Choi пре 11 година
родитељ
комит
71542dd896
1 измењених фајлова са 5 додато и 3 уклоњено
  1. 5 3
      plug.vim

+ 5 - 3
plug.vim

@@ -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 })