mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -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
|
function! fugitive#GitVersion(...) abort
|
||||||
let git = s:GitShellCmd()
|
let git = s:GitShellCmd()
|
||||||
if !has_key(s:git_versions, git)
|
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
|
endif
|
||||||
if !a:0
|
if !a:0
|
||||||
return s:git_versions[git]
|
return s:git_versions[git]
|
||||||
|
|||||||
Reference in New Issue
Block a user