Deprecate :Glog defaulting to current file

This commit is contained in:
Tim Pope
2019-01-05 14:03:45 -05:00
parent b9ea3efdf8
commit 29f16cd924
2 changed files with 14 additions and 7 deletions

View File

@@ -2840,6 +2840,12 @@ function! s:Log(cmd, bang, line1, line2, ...) abort
\ s:shellesc('--pretty=format:fugitive://'.b:git_dir.'//%H'.path.'::'.g:fugitive_summary_format), '%#')
let &grepformat = '%Cdiff %.%#,%C--- %.%#,%C+++ %.%#,%Z@@ -%\d%\+\,%\d%\+ +%l\,%\d%\+ @@,%-G-%.%#,%-G+%.%#,%-G %.%#,%A%f::%m,%-G%.%#'
exe a:cmd . (a:bang ? '! ' : ' ') . s:ShellExpand(before . after)
if len(path) && a:line2 == -1
redraw
echohl WarningMsg
echo ':Glog will soon default to all files. Use :0Glog to target current file'
echohl NONE
endif
finally
let &grepformat = grepformat
let &grepprg = grepprg