Fix invalid diagnosis of PlugStatus with wildcard tags (#619)

This commit is contained in:
Andrew Nowak 2017-04-14 02:13:49 +01:00 committed by Junegunn Choi
parent 580f0a559c
commit 1d3c88292b
2 changed files with 14 additions and 1 deletions

View File

@ -2022,7 +2022,7 @@ function! s:git_validate(spec, check_branch)
" Check tag " Check tag
if has_key(a:spec, 'tag') if has_key(a:spec, 'tag')
let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir)
if a:spec.tag !=# tag if a:spec.tag !=# tag && a:spec.tag !~ '\*'
let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.',
\ (empty(tag) ? 'N/A' : tag), a:spec.tag) \ (empty(tag) ? 'N/A' : tag), a:spec.tag)
endif endif

View File

@ -354,3 +354,16 @@ Expect:
- new-branch: OK - new-branch: OK
Finished. 0 error(s). Finished. 0 error(s).
[=] [=]
**********************************************************************
Execute (PlugStatus showed error with wildcard tag):
call plug#begin()
Plug 'junegunn/vim-easy-align', { 'tag': '*' }
call plug#end()
PlugUpdate
call PlugStatusSorted()
Expect:
- vim-easy-align: OK
Finished. 0 error(s).
[=]