File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1331,7 +1331,7 @@ while 1 " Without TCO, Vim stack is bound to explode
1331
1331
1332
1332
let name = keys (s: update .todo )[0 ]
1333
1333
let spec = remove (s: update .todo , name)
1334
- let new = ! isdirectory ( spec.dir )
1334
+ let new = empty ( globpath ( spec.dir , ' .git ' , 1 ) )
1335
1335
1336
1336
call s: log (new ? ' +' : ' *' , name, pull ? ' Updating ...' : ' Installing ...' )
1337
1337
redraw
Original file line number Diff line number Diff line change @@ -1511,7 +1511,7 @@ Execute (Commit hash support):
1511
1511
Log getline(1, '$')
1512
1512
AssertEqual 'x goyo.vim:', getline(5)
1513
1513
AssertEqual ' fatal: invalid reference: ffffffff', getline(6)
1514
- AssertEqual 0, stridx(getline(7), '- vim-emoji: HEAD is now at 9db7fcf... ')
1514
+ AssertEqual 0, stridx(getline(7), '- vim-emoji: HEAD is now at 9db7fcf')
1515
1515
1516
1516
let hash = system(printf('cd %s && git rev-parse HEAD', g:plugs['vim-emoji'].dir))[:-2]
1517
1517
AssertEqual '9db7fcfee0d90dafdbcb7a32090c0a9085eb054a', hash
@@ -1638,3 +1638,15 @@ Execute (#532 - Reuse plug window):
1638
1638
AssertEqual 2, winnr(), 'Current window is #2 after PlugStatus (but is '.winnr().')'
1639
1639
AssertEqual 2, winnr('$'), 'Three windows after PlugStatus (but got '.winnr('$').')'
1640
1640
q
1641
+
1642
+ Execute (#766 - Allow cloning into an empty directory):
1643
+ let d = '/tmp/vim-plug-test/goyo-already'
1644
+ call system('rm -rf ' . d)
1645
+ call mkdir(d)
1646
+ call plug#begin()
1647
+ Plug 'junegunn/goyo.vim', { 'dir': d }
1648
+ call plug#end()
1649
+ PlugInstall
1650
+ AssertExpect! '[=]', 1
1651
+ q
1652
+ unlet d
You can’t perform that action at this time.
0 commit comments