Fix false positve matching :Glog abbreviated SHA

This commit is contained in:
Tim Pope 2019-07-08 15:39:22 -04:00
parent 85a135a9b0
commit eaa0764940

View File

@ -3399,16 +3399,16 @@ function! s:Log(cmd, bang, line1, line2, ...) abort
let grepprg = &grepprg let grepprg = &grepprg
try try
let cdback = s:Cd(s:Tree()) let cdback = s:Cd(s:Tree())
let format = before =~# ' -g\| --walk-reflogs' ? '%gd>%gs' : '%h>' . g:fugitive_summary_format let format = before =~# ' -g\| --walk-reflogs' ? '%gd >%gs' : '%h >' . g:fugitive_summary_format
let &grepprg = escape(s:UserCommand() . ' --no-pager log --no-color ' . let &grepprg = escape(s:UserCommand() . ' --no-pager log --no-color ' .
\ s:shellesc('--pretty=format:fugitive://'.s:Dir().'//%H'.path.'>'.format), '%#') \ s:shellesc('--pretty=format:fugitive://'.s:Dir().'//%H'.path.' >'.format), '%#')
if has('patch-8.0.1782') if has('patch-8.0.1782')
let module = '%o' let module = '%o'
else else
let module = '%[^>]%#' let module = '%[^<> :]%#'
endif endif
let &grepformat = '%Cdiff %.%#,%C--- %.%#,%C+++ %.%#,%Z@@ -%\d%\+\,%\d%\+ +%l\,%\d%\+ @@,%-G-%.%#,%-G+%.%#,%-G %.%#,%A%f>' . module . '>%m,%-G%.%#' let &grepformat = '%Cdiff %.%#,%C--- %.%#,%C+++ %.%#,%Z@@ -%\d%\+\,%\d%\+ +%l\,%\d%\+ @@,%-G-%.%#,%-G+%.%#,%-G %.%#,%A%f >' . module . ' >%m,%-G%.%#'
silent! exe a:cmd . '!' . s:ShellExpand(before . after) silent! exe a:cmd . '!' . escape(s:ShellExpand(before . after), '|')
redraw! redraw!
copen copen
wincmd p wincmd p