mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user