Try :Git for default dispatch in status buffer

The downside of this approach is it has a different interaction model
than the quickfix list.  The upside is that it's more or less what I
actually want.  To those finding this wondering why it's now
synchronous, you can make it asynchronous by pressing CTRL-D.
This commit is contained in:
Tim Pope
2021-08-26 10:21:17 -04:00
parent d6e1a57b58
commit b64c426fd2

View File

@@ -2689,7 +2689,9 @@ function! fugitive#BufReadStatus() abort
if &bufhidden ==# ''
setlocal bufhidden=delete
endif
let b:dispatch = '-dir=' . s:fnameescape(len(s:Tree()) ? s:Tree() : s:GitDir()) . ' ' . s:GitShellCmd() . ' fetch --all'
if !exists('b:dispatch')
let b:dispatch = ':Git fetch --all'
endif
call fugitive#MapJumps()
call s:Map('n', '-', ":<C-U>execute <SID>Do('Toggle',0)<CR>", '<silent>')
call s:Map('x', '-', ":<C-U>execute <SID>Do('Toggle',1)<CR>", '<silent>')