From d176cca5ae8c47e33e54b1fffd578cb1e01ef773 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 11 Jul 2019 08:59:42 -0400 Subject: [PATCH] Don't include trailing newline in fugitive#GitVersion() --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index a34ad16..dacf9c2 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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]