mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Don't show bogus unstaged changes in bare repository
References https://github.com/tpope/vim-fugitive/pull/1262
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user