mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Don't show "Bare" status for worktrees attached to bare repos
I tried to make this foolproof and once again someone has invented a bigger fool.
This commit is contained in:
@@ -2600,11 +2600,13 @@ function! fugitive#BufReadStatus() abort
|
||||
if push !=# pull
|
||||
call s:AddHeader('Push', push)
|
||||
endif
|
||||
if empty(s:Tree())
|
||||
if get(fugitive#ConfigGetAll('core.bare', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$'
|
||||
call s:AddHeader('Bare', 'yes')
|
||||
elseif empty(s:Tree())
|
||||
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?')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user