diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 7855a51..5a72bf9 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2600,10 +2600,12 @@ function! fugitive#BufReadStatus() abort if push !=# pull call s:AddHeader('Push', push) endif - if get(fugitive#ConfigGetAll('core.bare', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$' - call s:AddHeader('Bare', 'yes') - elseif empty(s:Tree()) - call s:AddHeader('Error', s:worktree_error) + if empty(s:Tree()) + if get(fugitive#ConfigGetAll('core.bare', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$' + call s:AddHeader('Bare', 'yes') + else + call s:AddHeader('Error', s:worktree_error) + endif endif if get(fugitive#ConfigGetAll('advice.statusHints', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$' call s:AddHeader('Help', 'g?')