@@ -664,14 +664,6 @@ function! s:QuickfixStream(nr, event, title, cmd, first, callback, ...) abort
664664 endif
665665endfunction
666666
667- let s: common_efm = ' '
668- \ . ' %+Egit:%.%#,'
669- \ . ' %+Eusage:%.%#,'
670- \ . ' %+Eerror:%.%#,'
671- \ . ' %+Efatal:%.%#,'
672- \ . ' %-G%.%#%\e[K%.%#,'
673- \ . ' %-G%.%#%\r%.%\+'
674-
675667function ! fugitive#Cwindow () abort
676668 if &buftype == ' quickfix'
677669 cwindow
@@ -1967,7 +1959,7 @@ function! fugitive#BufReadStatus() abort
19671959 if &bufhidden == # ' '
19681960 setlocal bufhidden = delete
19691961 endif
1970- let b: dispatch = ' :Git fetch --all'
1962+ let b: dispatch = ' -dir= ' . fnameescape ( len ( s: Tree ()) ? s: Tree () : s: Dir ()) . ' ' . g: fugitive_git_executable . ' fetch --all'
19711963 call fugitive#MapJumps ()
19721964 call s: Map (' n' , ' -' , " :<C-U>execute <SID>Do('Toggle',0)<CR>" , ' <silent>' )
19731965 call s: Map (' x' , ' -' , " :<C-U>execute <SID>Do('Toggle',1)<CR>" , ' <silent>' )
@@ -4780,45 +4772,6 @@ function! fugitive#FetchComplete(A, L, P, ...) abort
47804772 return s: CompleteSub (' fetch' , a: A , a: L , a: P , function (' s:CompleteRemote' ), a: 000 )
47814773endfunction
47824774
4783- function ! s: Dispatch (bang , options ) abort
4784- let dir = a: options .dir
4785- exe s: DirCheck (dir )
4786- let [mp , efm , cc ] = [&l: mp , &l: efm , get (b: , ' current_compiler' , ' ' )]
4787- try
4788- let b: current_compiler = ' git'
4789- let &l: errorformat = s: common_efm .
4790- \ ' ,%\&git_dir=' . escape (substitute (dir , ' %' , ' %%' , ' g' ), ' \,' )
4791- let &l: makeprg = s: UserCommand ({' git' : a: options .git, ' dir' : dir }, s: AskPassArgs (dir ) + a: options .flags + [a: options .command ] + a: options .args )
4792- if exists (' :Make' ) == 2
4793- Make
4794- return ' '
4795- else
4796- if ! has (' patch-8.1.0334' ) && has (' terminal' ) && &autowrite
4797- let autowrite_was_set = 1
4798- set noautowrite
4799- silent ! wall
4800- endif
4801- silent noautocmd make !
4802- redraw !
4803- return ' call fugitive#Cwindow()|silent ' . s: DoAutocmd (' ShellCmdPost' )
4804- endif
4805- finally
4806- let [&l: mp , &l: efm , b: current_compiler ] = [mp , efm , cc ]
4807- if empty (cc ) | unlet ! b: current_compiler | endif
4808- if exists (' autowrite_was_set' )
4809- set autowrite
4810- endif
4811- endtry
4812- endfunction
4813-
4814- function ! s: PushSubcommand (line1, line2, range , bang , mods, options ) abort
4815- return s: Dispatch (a: bang ? ' !' : ' ' , a: options )
4816- endfunction
4817-
4818- function ! s: FetchSubcommand (line1, line2, range , bang , mods, options ) abort
4819- return s: Dispatch (a: bang ? ' !' : ' ' , a: options )
4820- endfunction
4821-
48224775" Section: :Gdiff
48234776
48244777augroup fugitive_diff
0 commit comments