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,10 +2600,12 @@ function! fugitive#BufReadStatus() abort
|
|||||||
if push !=# pull
|
if push !=# pull
|
||||||
call s:AddHeader('Push', push)
|
call s:AddHeader('Push', push)
|
||||||
endif
|
endif
|
||||||
if get(fugitive#ConfigGetAll('core.bare', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$'
|
if empty(s:Tree())
|
||||||
call s:AddHeader('Bare', 'yes')
|
if get(fugitive#ConfigGetAll('core.bare', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$'
|
||||||
elseif empty(s:Tree())
|
call s:AddHeader('Bare', 'yes')
|
||||||
call s:AddHeader('Error', s:worktree_error)
|
else
|
||||||
|
call s:AddHeader('Error', s:worktree_error)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
if get(fugitive#ConfigGetAll('advice.statusHints', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$'
|
if get(fugitive#ConfigGetAll('advice.statusHints', config), 0, 'true') !~# '^\%(false\|no|off\|0\|\)$'
|
||||||
call s:AddHeader('Help', 'g?')
|
call s:AddHeader('Help', 'g?')
|
||||||
|
|||||||
Reference in New Issue
Block a user