Fix fatal invalid reference for repos have no tags

This commit is contained in:
Lingchao Xin 2020-01-23 20:21:37 +08:00 committed by GitHub
parent 2f5f74e5e6
commit 8979109a6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1158,7 +1158,7 @@ function! s:update_finish()
if has_key(spec, 'commit')
call s:log4(name, 'Checking out '.spec.commit)
let out = s:checkout(spec)
elseif has_key(spec, 'tag')
elseif has_key(spec, 'tag') && spec.tag
let tag = spec.tag
if tag =~ '\*'
let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir))