From 8899468c092c8dff806b1563ca4a7b055ae54007 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 6 Feb 2019 15:19:37 -0500 Subject: [PATCH] Handle `git --version` with `(Apple ...)` suffix References https://github.com/tpope/vim-fugitive/issues/1194 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index ae2ebf4..142d79a 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -181,7 +181,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'), "\\S\\+\\ze\n") + let s:git_versions[g:fugitive_git_executable] = matchstr(system(g:fugitive_git_executable.' --version'), '\d\S\+') endif if !a:0 return s:git_versions[g:fugitive_git_executable]