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
co-authored by GitHub
parent 2f5f74e5e6
commit 8979109a6f
+1 -1
View File
@@ -1158,7 +1158,7 @@ function! s:update_finish()
if has_key(spec, 'commit') if has_key(spec, 'commit')
call s:log4(name, 'Checking out '.spec.commit) call s:log4(name, 'Checking out '.spec.commit)
let out = s:checkout(spec) let out = s:checkout(spec)
elseif has_key(spec, 'tag') elseif has_key(spec, 'tag') && spec.tag
let tag = spec.tag let tag = spec.tag
if tag =~ '\*' if tag =~ '\*'
let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir))