Check spec.branch is empty

This commit is contained in:
Yasuhiro Matsumoto 2020-08-27 21:50:58 +09:00
parent e6edb7f19e
commit b8439a9573
No known key found for this signature in database
GPG Key ID: 622DE34DC490584B

View File

@ -2336,7 +2336,7 @@ function! s:git_validate(spec, check_branch)
\ (empty(tag) ? 'N/A' : tag), a:spec.tag)
endif
" Check branch
elseif a:spec.branch !=# branch
elseif a:spec.branch != '' && a:spec.branch !=# branch
let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.',
\ branch, a:spec.branch)
endif