diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 11a53ad..4bf3742 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1826,7 +1826,8 @@ function! fugitive#BufReadStatus() abort if push !=# pull call s:AddHeader('Push', push) endif - if empty(s:Tree()) + let tree = s:Tree() + if empty(tree) call s:AddHeader('Bare', 'yes') endif call s:AddSection('Rebasing ' . rebasing_head, rebasing) @@ -1844,7 +1845,8 @@ function! fugitive#BufReadStatus() abort if &bufhidden ==# '' setlocal bufhidden=delete 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 s:Map('n', '-', ":execute Do('Toggle',0)", '') call s:Map('x', '-', ":execute Do('Toggle',1)", '')