Don't include trailing newline in fugitive#GitVersion()

This commit is contained in:
Tim Pope 2019-07-11 08:59:42 -04:00
parent aa68223376
commit d176cca5ae

View File

@ -201,7 +201,7 @@ endfunction
let s:git_versions = {}
function! fugitive#GitVersion(...) abort
if !has_key(s:git_versions, g:fugitive_git_executable)
let s:git_versions[g:fugitive_git_executable] = matchstr(system(g:fugitive_git_executable.' --version'), '\d\S\+')
let s:git_versions[g:fugitive_git_executable] = matchstr(system(g:fugitive_git_executable.' --version'), '\d[^[:space:]]\+')
endif
if !a:0
return s:git_versions[g:fugitive_git_executable]