From 891b0a92fea1b0c2ea30f638d632985b5362c60d Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 1 Mar 2023 19:45:04 -0500 Subject: [PATCH] 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. --- autoload/fugitive.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index d29b953..70b8a38 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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