Remove last vestiges of :Gread!

This commit is contained in:
Tim Pope
2022-06-12 16:06:35 -04:00
parent 8c63ac0f2f
commit 0680c3ae3c
3 changed files with 5 additions and 18 deletions

View File

@@ -6090,9 +6090,6 @@ endfunction
function! fugitive#ReadCommand(line1, count, range, bang, mods, arg, ...) abort
exe s:VersionCheck()
if a:bang
return 'echoerr ' . string(':Gread! for temp buffer output has been replaced by :{range}Git! --paginate')
endif
let [read, post] = s:ReadPrepare(a:line1, a:count, a:range, a:mods)
try
let [file, pre] = s:OpenParse(a:arg, 0)
@@ -6114,11 +6111,7 @@ function! fugitive#EditComplete(A, L, P) abort
endfunction
function! fugitive#ReadComplete(A, L, P) abort
if a:L =~# '^\w\+!'
return fugitive#Complete(a:A, a:L, a:P)
else
return fugitive#EditComplete(a:A, a:L, a:P)
endif
endfunction
" Section: :Gwrite, :Gwq

View File

@@ -165,12 +165,6 @@ plus |:grep|.
:{range}Gread [object] |:read| in a |fugitive-object| after {range}.
*:Gread!* *fugitive-:Gr!*
:Gread! [args] Empty the buffer and |:read| the output of a Git
command. For example, :Gread! show HEAD:%.
:{range}Gread! [args] |:read| the output of a Git command after {range}.
*:Gwrite* *fugitive-:Gw*
:Gwrite Write to the current file's path and stage the results.
When run in a work tree file, it is effectively git

View File

@@ -573,10 +573,10 @@ exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#LogComplete
exe 'command! -bar -bang -nargs=* -complete=customlist,fugitive#EditComplete Ge exe fugitive#Open("edit<bang>", 0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -complete=customlist,fugitive#EditComplete Gedit exe fugitive#Open("edit<bang>", 0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -complete=customlist,fugitive#ReadComplete Gpedit exe fugitive#Open("pedit", <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_other '-complete=customlist,fugitive#ReadComplete Gsplit exe fugitive#Open((<count> > 0 ? <count> : "").(<count> ? "split" : "edit"), <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_other '-complete=customlist,fugitive#ReadComplete Gvsplit exe fugitive#Open((<count> > 0 ? <count> : "").(<count> ? "vsplit" : "edit!"), <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_tabs '-complete=customlist,fugitive#ReadComplete Gtabedit exe fugitive#Open((<count> >= 0 ? <count> : "")."tabedit", <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -complete=customlist,fugitive#EditComplete Gpedit exe fugitive#Open("pedit", <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_other '-complete=customlist,fugitive#EditComplete Gsplit exe fugitive#Open((<count> > 0 ? <count> : "").(<count> ? "split" : "edit"), <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_other '-complete=customlist,fugitive#EditComplete Gvsplit exe fugitive#Open((<count> > 0 ? <count> : "").(<count> ? "vsplit" : "edit!"), <bang>0, "<mods>", <q-args>)'
exe 'command! -bar -bang -nargs=* -range=-1' s:addr_tabs '-complete=customlist,fugitive#EditComplete Gtabedit exe fugitive#Open((<count> >= 0 ? <count> : "")."tabedit", <bang>0, "<mods>", <q-args>)'
if exists(':Gr') != 2
exe 'command! -bar -bang -nargs=* -range=-1 -complete=customlist,fugitive#ReadComplete Gr exe fugitive#ReadCommand(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)'