Allow cloning into an empty directory (#782)

Close #766

We can rely on git to check if the destination directory is empty.
This commit is contained in:
Junegunn Choi
2018-09-12 13:45:38 +09:00
committed by GitHub
parent 7f8fdd0444
commit b6050d6f03
2 changed files with 14 additions and 2 deletions

View File

@@ -1331,7 +1331,7 @@ while 1 " Without TCO, Vim stack is bound to explode
let name = keys(s:update.todo)[0]
let spec = remove(s:update.todo, name)
let new = !isdirectory(spec.dir)
let new = empty(globpath(spec.dir, '.git', 1))
call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...')
redraw