From 5d7e6560817138110abec3e5c9903b408bc21f51 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sat, 21 May 2022 21:57:01 +0200 Subject: [PATCH] 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 --- autoload/airline/extensions/branch.vim | 3 +-- autoload/airline/util.vim | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index fc0d5fa7..5d82cddd 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -97,8 +97,7 @@ function! s:update_git_branch() endfunction function! s:config_fugitive_branch() abort - let s:vcs_config['git'].branch = exists('*FugitiveHead') ? - \ FugitiveHead(s:sha1size) : fugitive#head(s:sha1size) + let s:vcs_config['git'].branch = FugitiveHead(s:sha1size) if s:vcs_config['git'].branch is# 'master' && \ airline#util#winwidth() < 81 " Shorten default a bit diff --git a/autoload/airline/util.vim b/autoload/airline/util.vim index bb0a1d2b..40a54d58 100644 --- a/autoload/airline/util.vim +++ b/autoload/airline/util.vim @@ -144,7 +144,7 @@ endfunction function! airline#util#has_fugitive() if !exists("s:has_fugitive") - let s:has_fugitive = exists('*fugitive#head') || exists('*FugitiveHead') + let s:has_fugitive = exists('*FugitiveHead') endif return s:has_fugitive endfunction