Proper escaping of tag patterns

Close #610
This commit is contained in:
Junegunn Choi 2017-04-04 17:45:37 +09:00
parent 7f4e6cb843
commit 46ae29985d
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -1063,7 +1063,7 @@ function! s:update_finish()
elseif has_key(spec, 'tag') elseif has_key(spec, 'tag')
let tag = spec.tag let tag = spec.tag
if tag =~ '\*' if tag =~ '\*'
let tags = s:lines(s:system('git tag --list '.string(tag).' --sort -version:refname 2>&1', spec.dir)) let tags = s:lines(s:system('git tag --list '.s:shellesc(tag).' --sort -version:refname 2>&1', spec.dir))
if !v:shell_error && !empty(tags) if !v:shell_error && !empty(tags)
let tag = tags[0] let tag = tags[0]
call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag))