fugitive: remove old fugitive test

As mentioned by @tpope, remove the old test for the autoloaded function
fugitivie#head() and instead use consistently FugitiveHead() everywhere
This commit is contained in:
Christian Brabandt 2022-05-21 21:57:01 +02:00
parent c465570143
commit 5d7e656081
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 2 additions and 3 deletions

View File

@ -97,8 +97,7 @@ function! s:update_git_branch()
endfunction endfunction
function! s:config_fugitive_branch() abort function! s:config_fugitive_branch() abort
let s:vcs_config['git'].branch = exists('*FugitiveHead') ? let s:vcs_config['git'].branch = FugitiveHead(s:sha1size)
\ FugitiveHead(s:sha1size) : fugitive#head(s:sha1size)
if s:vcs_config['git'].branch is# 'master' && if s:vcs_config['git'].branch is# 'master' &&
\ airline#util#winwidth() < 81 \ airline#util#winwidth() < 81
" Shorten default a bit " Shorten default a bit

View File

@ -144,7 +144,7 @@ endfunction
function! airline#util#has_fugitive() function! airline#util#has_fugitive()
if !exists("s:has_fugitive") if !exists("s:has_fugitive")
let s:has_fugitive = exists('*fugitive#head') || exists('*FugitiveHead') let s:has_fugitive = exists('*FugitiveHead')
endif endif
return s:has_fugitive return s:has_fugitive
endfunction endfunction