Skip to content

Commit 4c5f6fc

Browse files
committed
Retire old :Gsplit! family of temp buffer commands
1 parent 5c821eb commit 4c5f6fc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

autoload/fugitive.vim

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4545,9 +4545,10 @@ function! s:OpenExec(cmd, mods, env, args, ...) abort
45454545
return 'echo ' . string(':!' . s:UserCommand(options, a:args))
45464546
endfunction
45474547

4548+
let s:bang_edits = {'split': 'Git', 'vsplit': 'vert Git', 'tabedit': 'tab Git', 'pedit': 'Git!'}
45484549
function! fugitive#Open(cmd, bang, mods, arg, args) abort
45494550
if a:bang
4550-
return s:OpenExec(a:cmd, a:mods, {}, s:SplitExpand(a:arg, s:Tree()))
4551+
return 'echoerr ' . string(':G' . a:cmd . '! for temp buffer output has been replaced by :' . get(s:bang_edits, a:cmd, 'Git') . ' --paginate')
45514552
endif
45524553

45534554
let mods = s:Mods(a:mods)
@@ -4595,9 +4596,7 @@ endfunction
45954596

45964597
function! fugitive#ReadCommand(line1, count, range, bang, mods, arg, args) abort
45974598
if a:bang
4598-
let dir = s:Dir()
4599-
let args = s:SplitExpand(a:arg, s:Tree(dir))
4600-
return s:ReadExec(a:line1, a:count, a:range, a:mods, {}, args, {'dir': dir})
4599+
return 'echoerr ' . string(':Gread! for temp buffer output has been replaced by :{range}Git! --paginate')
46014600
endif
46024601
let [read, post] = s:ReadPrepare(a:line1, a:count, a:range, a:mods)
46034602
try

0 commit comments

Comments
 (0)