Show unpulled before unpushed

This is what Magit does and I *think* it makes sense because you have to
pull before you can push.
This commit is contained in:
Tim Pope
2020-01-25 21:13:00 -05:00
parent 54b308eedb
commit 279d56eb47

View File

@@ -1884,17 +1884,17 @@ function! fugitive#BufReadStatus() abort
call s:AddSection('Staged', staged) call s:AddSection('Staged', staged)
let staged_end = len(staged) ? line('$') : 0 let staged_end = len(staged) ? line('$') : 0
if len(push) && !(push ==# pull && get(props, 'branch.ab') =~# '^+0 ') if len(pull) && get(props, 'branch.ab') !~# ' -0$'
call s:AddSection('Unpushed to ' . push, s:QueryLog(push . '..' . head)) call s:AddSection('Unpulled from ' . pull, s:QueryLog(head . '..' . pull))
endif
if len(pull) && push !=# pull
call s:AddSection('Unpushed to ' . pull, s:QueryLog(pull . '..' . head))
endif endif
if len(push) && push !=# pull if len(push) && push !=# pull
call s:AddSection('Unpulled from ' . push, s:QueryLog(head . '..' . push)) call s:AddSection('Unpulled from ' . push, s:QueryLog(head . '..' . push))
endif endif
if len(pull) && get(props, 'branch.ab') !~# ' -0$' if len(pull) && push !=# pull
call s:AddSection('Unpulled from ' . pull, s:QueryLog(head . '..' . pull)) call s:AddSection('Unpushed to ' . pull, s:QueryLog(pull . '..' . head))
endif
if len(push) && !(push ==# pull && get(props, 'branch.ab') =~# '^+0 ')
call s:AddSection('Unpushed to ' . push, s:QueryLog(push . '..' . head))
endif endif
setlocal nomodified readonly noswapfile setlocal nomodified readonly noswapfile