From 0cc219088992d0658881d33952bcbf8ec8ae1185 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 12 Feb 2021 18:35:06 -0500 Subject: [PATCH] Add deprecation notices to git subcommand wrappers --- plugin/fugitive.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index edb81e5..4fc5906 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -431,7 +431,9 @@ endif for s:cmd in ['Commit', 'Revert', 'Merge', 'Rebase', 'Pull', 'Push', 'Fetch', 'Blame'] if exists(':G' . tolower(s:cmd)) != 2 - exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd) 'exe fugitive#Command(, , +"", 0, "", "' . tolower(s:cmd) . ' " . )' + exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd) + \ 'echohl WarningMSG|echo ":G' . tolower(s:cmd) . ' is deprecated in favor of :Git ' . tolower(s:cmd) . '\n"|echohl NONE|' + \ 'exe fugitive#Command(, , +"", 0, "", "' . tolower(s:cmd) . ' " . )' endif endfor unlet s:cmd