From 8979109a6fd76bf422bc10c043b39e6d5dc60c68 Mon Sep 17 00:00:00 2001 From: Lingchao Xin Date: Thu, 23 Jan 2020 20:21:37 +0800 Subject: [PATCH] Fix fatal invalid reference for repos have no tags --- plug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 78fdc03..fb7a1fd 100644 --- a/plug.vim +++ b/plug.vim @@ -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))