mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -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
|
if len(pull) && push !=# pull
|
||||||
call s:AddLogSection('Unpushed to ' . pull, [pull . '..' . head])
|
call s:AddLogSection('Unpushed to ' . pull, [pull . '..' . head])
|
||||||
endif
|
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'])
|
call s:AddLogSection('Unpushed to *', [head, '--not', '--remotes'])
|
||||||
endif
|
endif
|
||||||
if len(push) && push !=# pull
|
if len(push) && push !=# pull
|
||||||
|
|||||||
Reference in New Issue
Block a user