commit 0680c3ae3cb7f3a53b2dabdae3fabe363b66ab49 (tree)
parent 8c63ac0f2fedd385fafc7dd70ef361c40abe76f3
Author: Tim Pope <code@tpope.net>
Date: Sun, 12 Jun 2022 16:06:35 -0400
Remove last vestiges of :Gread!
Diffstat:
3 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -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
+ return fugitive#EditComplete(a:A, a:L, a:P)
endfunction
" Section: :Gwrite, :Gwq
diff --git a/doc/fugitive.txt b/doc/fugitive.txt
@@ -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
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -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>)'