Provide FugitiveGitVersion()

I should have made fugitive#GitVersion() official a long time ago.
Better late than never.
This commit is contained in:
Tim Pope
2021-08-20 13:04:27 -04:00
parent b06ad2a839
commit 93174147cd

View File

@@ -99,6 +99,14 @@ function! FugitiveParse(...) abort
throw v:errmsg
endfunction
" FugitiveGitVersion() queries the version of Git in use. Pass up to 3
" arguments to return a Boolean of whether a certain minimum version is
" available (FugitiveGitVersion(2,3,4) checks for 2.3.4 or higher) or no
" arguments to get a raw string.
function! FugitiveGitVersion(...) abort
return call('fugitive#GitVersion', a:000)
endfunction
" FugitiveResult() returns an object encapsulating the result of the most
" recent :Git command. Will be empty if no result is available. During a
" User FugitiveChanged event, this is guaranteed to correspond to the :Git