Don't include newline in Git version

This commit is contained in:
Tim Pope
2018-06-27 20:31:35 -04:00
parent 2c30e116ed
commit ea38c7d664

View File

@@ -91,7 +91,7 @@ endfunction
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'), "\\S\\+\n")
let s:git_versions[g:fugitive_git_executable] = matchstr(system(g:fugitive_git_executable.' --version'), "\\S\\+\\ze\n")
endif
return s:git_versions[g:fugitive_git_executable]
endfunction