commit 43e752dcfde60b3e6affd0b3b2e4482b1fd4f2b3 (tree)
parent 063d1fcaa980207e44f2bcbe1bccf895daf2b3af
Author: Tim Pope <code@tpope.net>
Date: Mon, 14 Dec 2009 00:00:03 -0500
Allow overriding :Glog summary format
One can now set fugitive_summary_format to change the message in :Glog.
The default is
let g:fugitive_summary_format = '%s'
This isn't documented yet because it might be taken away.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -541,6 +541,10 @@ endfunction
" }}}1
" Ggrep, Glog {{{1
+if !exists('g:fugitive_summary_format')
+ let g:fugitive_summary_format = '%s'
+endif
+
call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Ggrep :execute s:Grep(<bang>0,<q-args>)")
call s:command("-bar -bang -nargs=* -complete=customlist,s:EditComplete Glog :execute s:Log('grep<bang>',<f-args>)")
@@ -583,7 +587,7 @@ function! s:Log(cmd,...)
let path = ''
endif
let cmd = ['--no-pager', 'log', '--no-color']
- let cmd += [escape('--pretty=format:fugitive://'.s:repo().dir().'//%H'.path.'::%s','%')]
+ let cmd += [escape('--pretty=format:fugitive://'.s:repo().dir().'//%H'.path.'::'.g:fugitive_summary_format,'%')]
if empty(filter(a:000[0 : index(a:000,'--')],'v:val !~# "^-"'))
if s:buffer().commit() =~# '\x\{40\}'
let cmd += [s:buffer().commit()]