Skip to content

Commit 0cc2190

Browse files
committed
Add deprecation notices to git subcommand wrappers
1 parent 4c5f6fc commit 0cc2190

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/fugitive.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ endif
431431

432432
for s:cmd in ['Commit', 'Revert', 'Merge', 'Rebase', 'Pull', 'Push', 'Fetch', 'Blame']
433433
if exists(':G' . tolower(s:cmd)) != 2
434-
exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd) 'exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", "' . tolower(s:cmd) . ' " . <q-args>)'
434+
exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd)
435+
\ 'echohl WarningMSG|echo ":G' . tolower(s:cmd) . ' is deprecated in favor of :Git ' . tolower(s:cmd) . '\n"|echohl NONE|'
436+
\ 'exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", "' . tolower(s:cmd) . ' " . <q-args>)'
435437
endif
436438
endfor
437439
unlet s:cmd

0 commit comments

Comments
 (0)