diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 36e6702..3aa4491 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1496,8 +1496,8 @@ endif call s:command("-bang -nargs=? -complete=customlist,s:EditComplete Ggrep :execute s:Grep('grep',0,)") call s:command("-bang -nargs=? -complete=customlist,s:EditComplete Glgrep :execute s:Grep('lgrep',0,)") -call s:command("-bar -bang -nargs=* -range=0 -complete=customlist,s:EditComplete Glog :call s:Log('grep',,,)") -call s:command("-bar -bang -nargs=* -range=0 -complete=customlist,s:EditComplete Gllog :call s:Log('lgrep',,,)") +call s:command("-bar -bang -nargs=* -range=0 -complete=customlist,s:EditComplete Glog :call s:Log('grep',0,,,)") +call s:command("-bar -bang -nargs=* -range=0 -complete=customlist,s:EditComplete Gllog :call s:Log('lgrep',0,,,)") function! s:Grep(cmd,bang,arg) abort let grepprg = &grepprg @@ -1538,7 +1538,7 @@ function! s:Grep(cmd,bang,arg) abort endtry endfunction -function! s:Log(cmd, line1, line2, ...) abort +function! s:Log(cmd, bang, line1, line2, ...) abort let path = s:Relative('/') if path =~# '^/\.git\%(/\|$\)' || index(a:000,'--') != -1 let path = '' @@ -1569,7 +1569,7 @@ function! s:Log(cmd, line1, line2, ...) abort execute cd s:fnameescape(s:repo().tree()) let &grepprg = escape(s:git_command() . join(map(cmd, '" ".s:shellesc(v:val)'), ''), '%#') let &grepformat = '%Cdiff %.%#,%C--- %.%#,%C+++ %.%#,%Z@@ -%\d%\+\,%\d%\+ +%l\,%\d%\+ @@,%-G-%.%#,%-G+%.%#,%-G %.%#,%A%f::%m,%-G%.%#' - exe a:cmd + exe a:cmd . (a:bang ? '!' : '') finally let &grepformat = grepformat let &grepprg = grepprg