@@ -664,14 +664,6 @@ function! s:QuickfixStream(nr, event, title, cmd, first, callback, ...) abort
664
664
endif
665
665
endfunction
666
666
667
- let s: common_efm = ' '
668
- \ . ' %+Egit:%.%#,'
669
- \ . ' %+Eusage:%.%#,'
670
- \ . ' %+Eerror:%.%#,'
671
- \ . ' %+Efatal:%.%#,'
672
- \ . ' %-G%.%#%\e[K%.%#,'
673
- \ . ' %-G%.%#%\r%.%\+'
674
-
675
667
function ! fugitive#Cwindow () abort
676
668
if &buftype == ' quickfix'
677
669
cwindow
@@ -1967,7 +1959,7 @@ function! fugitive#BufReadStatus() abort
1967
1959
if &bufhidden == # ' '
1968
1960
setlocal bufhidden = delete
1969
1961
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'
1971
1963
call fugitive#MapJumps ()
1972
1964
call s: Map (' n' , ' -' , " :<C-U>execute <SID>Do('Toggle',0)<CR>" , ' <silent>' )
1973
1965
call s: Map (' x' , ' -' , " :<C-U>execute <SID>Do('Toggle',1)<CR>" , ' <silent>' )
@@ -4780,45 +4772,6 @@ function! fugitive#FetchComplete(A, L, P, ...) abort
4780
4772
return s: CompleteSub (' fetch' , a: A , a: L , a: P , function (' s:CompleteRemote' ), a: 000 )
4781
4773
endfunction
4782
4774
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
-
4822
4775
" Section: :Gdiff
4823
4776
4824
4777
augroup fugitive_diff
0 commit comments