From 1d3c88292b109d56c18dd8b045af5585715096d2 Mon Sep 17 00:00:00 2001 From: Andrew Nowak Date: Fri, 14 Apr 2017 02:13:49 +0100 Subject: [PATCH] Fix invalid diagnosis of PlugStatus with wildcard tags (#619) --- plug.vim | 2 +- test/regressions.vader | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 3b418cc..82e83ca 100644 --- a/plug.vim +++ b/plug.vim @@ -2022,7 +2022,7 @@ function! s:git_validate(spec, check_branch) " Check tag if has_key(a:spec, 'tag') 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.', \ (empty(tag) ? 'N/A' : tag), a:spec.tag) endif diff --git a/test/regressions.vader b/test/regressions.vader index 2b76693..6a0c058 100644 --- a/test/regressions.vader +++ b/test/regressions.vader @@ -354,3 +354,16 @@ Expect: - new-branch: OK 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). + [=]