mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 23:33:43 -05:00
Handle git --version with (Apple ...) suffix
References https://github.com/tpope/vim-fugitive/issues/1194
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user