mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-06 09:04:23 +08:00
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:
2
plug.vim
2
plug.vim
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user