mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 04:53:45 -05:00
Fix determining Git version with custom Git command
Resolves: https://github.com/tpope/vim-fugitive/issues/1801
This commit is contained in:
@@ -321,7 +321,7 @@ let s:git_versions = {}
|
||||
function! fugitive#GitVersion(...) abort
|
||||
let git = s:GitShellCmd()
|
||||
if !has_key(s:git_versions, git)
|
||||
let s:git_versions[git] = matchstr(s:SystemError([git, '--version'])[0], '\d[^[:space:]]\+')
|
||||
let s:git_versions[git] = matchstr(s:SystemError(s:GitCmd() + ['--version'])[0], '\d[^[:space:]]\+')
|
||||
endif
|
||||
if !a:0
|
||||
return s:git_versions[git]
|
||||
|
||||
Reference in New Issue
Block a user