mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Don't show "Unpushed to *" if no remotes
If there are no remotes, then this section will always contain the entire branch history, or a truncated version thereof. I want all sections to be meaningfully bounded.
This commit is contained in:
@@ -2906,7 +2906,8 @@ function! fugitive#BufReadStatus(...) abort
|
||||
if len(pull) && push !=# pull
|
||||
call s:AddLogSection('Unpushed to ' . pull, [pull . '..' . head])
|
||||
endif
|
||||
if empty(pull) && empty(push) && empty(rebasing)
|
||||
if empty(pull) && empty(push) && empty(rebasing) &&
|
||||
\ !empty(fugitive#ConfigGetRegexp('^remote\..*\.url$', config))
|
||||
call s:AddLogSection('Unpushed to *', [head, '--not', '--remotes'])
|
||||
endif
|
||||
if len(push) && push !=# pull
|
||||
|
||||
Reference in New Issue
Block a user