mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 07:13:52 -05:00
When push ref is missing, show unpushed upstream commits instead
This is a lie, but it matches what I (and probably most people) expect to happen.
This commit is contained in:
@@ -2926,6 +2926,11 @@ function! fugitive#BufReadStatus(...) abort
|
|||||||
else
|
else
|
||||||
let unpushed_pull = s:QueryLogRange(pull_ref, head)
|
let unpushed_pull = s:QueryLogRange(pull_ref, head)
|
||||||
endif
|
endif
|
||||||
|
" If the push ref is defined but nowhere to be found at the remote,
|
||||||
|
" pretend it's the same as the pull ref
|
||||||
|
if unpushed_push.error == 1
|
||||||
|
let unpushed_push = unpushed_pull
|
||||||
|
endif
|
||||||
call s:AddLogSection('Unpushed to ' . push_short, unpushed_push)
|
call s:AddLogSection('Unpushed to ' . push_short, unpushed_push)
|
||||||
call s:AddLogSection('Unpushed to ' . pull_short, unpushed_pull)
|
call s:AddLogSection('Unpushed to ' . pull_short, unpushed_pull)
|
||||||
if unpushed_push.error && unpushed_pull.error && empty(rebasing) &&
|
if unpushed_push.error && unpushed_pull.error && empty(rebasing) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user