Просмотр исходного кода

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

Andrew Nowak 8 лет назад
Родитель
Сommit
1d3c88292b
2 измененных файлов с 14 добавлено и 1 удалено
  1. 1 1
      plug.vim
  2. 13 0
      test/regressions.vader

+ 1 - 1
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

+ 13 - 0
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).
+  [=]