Specify shell command, not wrapper, in b:dispatch

This frees us up to change :Gfetch not to use :Make.
This commit is contained in:
Tim Pope
2020-01-19 08:49:43 -05:00
parent 1a6934fc7e
commit 5bcb42164e

View File

@@ -1826,7 +1826,8 @@ function! fugitive#BufReadStatus() abort
if push !=# pull if push !=# pull
call s:AddHeader('Push', push) call s:AddHeader('Push', push)
endif endif
if empty(s:Tree()) let tree = s:Tree()
if empty(tree)
call s:AddHeader('Bare', 'yes') call s:AddHeader('Bare', 'yes')
endif endif
call s:AddSection('Rebasing ' . rebasing_head, rebasing) call s:AddSection('Rebasing ' . rebasing_head, rebasing)
@@ -1844,7 +1845,8 @@ function! fugitive#BufReadStatus() abort
if &bufhidden ==# '' if &bufhidden ==# ''
setlocal bufhidden=delete setlocal bufhidden=delete
endif endif
let b:dispatch = ':Gfetch --all' let b:dispatch = '-compiler=git -dir=' . s:fnameescape(len(tree) ? tree : s:Dir()) .
\ ' ' . s:UserCommand() . ' ' . s:shellesc(s:AskPassArgs(s:Dir())) . ' fetch --all'
call fugitive#MapJumps() call fugitive#MapJumps()
call s:Map('n', '-', ":<C-U>execute <SID>Do('Toggle',0)<CR>", '<silent>') 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>') call s:Map('x', '-', ":<C-U>execute <SID>Do('Toggle',1)<CR>", '<silent>')