mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 22:33:51 -05:00
Provide FugitiveGitVersion()
I should have made fugitive#GitVersion() official a long time ago. Better late than never.
This commit is contained in:
@@ -99,6 +99,14 @@ function! FugitiveParse(...) abort
|
|||||||
throw v:errmsg
|
throw v:errmsg
|
||||||
endfunction
|
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
|
" FugitiveResult() returns an object encapsulating the result of the most
|
||||||
" recent :Git command. Will be empty if no result is available. During a
|
" recent :Git command. Will be empty if no result is available. During a
|
||||||
" User FugitiveChanged event, this is guaranteed to correspond to the :Git
|
" User FugitiveChanged event, this is guaranteed to correspond to the :Git
|
||||||
|
|||||||
Reference in New Issue
Block a user