diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 67c8647..2b05056 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1724,6 +1724,10 @@ function! fugitive#BufReadStatus() abort endwhile endif + if empty(s:Tree()) + let [unstaged, untracked] = [[], []] + endif + for dict in staged let b:fugitive_files['Staged'][dict.filename] = dict endfor @@ -1820,6 +1824,9 @@ function! fugitive#BufReadStatus() abort if push !=# pull call s:AddHeader('Push', push) endif + if empty(s:Tree()) + call s:AddHeader('Bare', 'yes') + endif call s:AddSection('Rebasing ' . rebasing_head, rebasing) call s:AddSection('Untracked', untracked) call s:AddSection('Unstaged', unstaged)