motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 649cb2dc05316a4e933ddf467acfa5ac8c1e020e (tree)
parent 47479a6cc2a8b8e47de80dc7ed915bad726902b8
Author: Tim Pope <code@tpope.net>
Date:   Mon, 12 Apr 2021 12:06:18 -0400

Add deprecation warnings to :Glog and :Gstatus

Diffstat:
Mautoload/fugitive.vim | 3---
Mplugin/fugitive.vim | 2++
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -4835,9 +4835,6 @@ function! fugitive#LogCommand(line1, count, range, bang, mods, args, type) abort \ args + extra_args + paths + extra_paths) let state.target = path let title = titlepre . (listnr < 0 ? 'Gclog ' : 'Gllog ') . s:fnameescape(args + paths) - if empty(paths + extra_paths) && empty(a:type) && a:count < 0 && len(s:Relative('/')) - let after = '|echohl WarningMsg|echo ' . string('Use :0Glog or :0Gclog for old behavior of targeting current file') . '|echohl NONE' . after - endif return s:QuickfixStream(listnr, 'log', title, s:UserCommandList(dir) + cmd, !a:bang, a:mods, s:function('s:LogParse'), state, dir) . after endfunction diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -425,6 +425,7 @@ command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete Git exe if exists(':Gstatus') != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bang -bar -range=-1' s:addr_other 'Gstatus exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)' + \ '|echohl WarningMSG|echo ":Gstatus is deprecated in favor of :Git (with no arguments)"|echohl NONE' endif for s:cmd in ['Commit', 'Revert', 'Merge', 'Rebase', 'Pull', 'Push', 'Fetch', 'Blame'] @@ -445,6 +446,7 @@ exe 'command! -bang -nargs=? -range=-1' s:addr_wins '-complete=customlist,fugiti if exists(':Glog') != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#LogComplete Glog :exe fugitive#LogCommand(<line1>,<count>,+"<range>",<bang>0,"<mods>",<q-args>, "")' + \ '|echohl WarningMSG|echo ":Glog is deprecated in favor of :Gclog"|echohl NONE' endif exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#LogComplete Gclog :exe fugitive#LogCommand(<line1>,<count>,+"<range>",<bang>0,"<mods>",<q-args>, "c")' exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#LogComplete GcLog :exe fugitive#LogCommand(<line1>,<count>,+"<range>",<bang>0,"<mods>",<q-args>, "c")'