From 8bdbbf88a4a3b3a8cbbfaf81b625dbab51990416 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 1 Sep 2021 10:24:04 -0400 Subject: [PATCH] Change :Gstatus to error stub --- plugin/fugitive.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 771ae59..8dc61ff 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -479,9 +479,12 @@ if exists(':G') != 2 endif command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete Git exe fugitive#Command(, , +"", 0, "", ) -if exists(':Gstatus') != 2 && get(g:, 'fugitive_legacy_commands', 1) +if exists(':Gstatus') != 2 && get(g:, 'fugitive_legacy_commands', 0) exe 'command! -bang -bar -range=-1' s:addr_other 'Gstatus exe fugitive#Command(, , +"", 0, "", )' \ '|echohl WarningMSG|echomsg ":Gstatus is deprecated in favor of :Git (with no arguments)"|echohl NONE' +elseif exists(':Gstatus') != 2 && !exists('g:fugitive_legacy_commands') + exe 'command! -bang -bar -range=-1' s:addr_other 'Gstatus' + \ ' echoerr ":Gstatus has been removed in favor of :Git (with no arguments)"' endif for s:cmd in ['Commit', 'Revert', 'Merge', 'Rebase', 'Pull', 'Push', 'Fetch', 'Blame']