From 43e752dcfde60b3e6affd0b3b2e4482b1fd4f2b3 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 14 Dec 2009 00:00:03 -0500 Subject: [PATCH] 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. --- plugin/fugitive.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 0c3249a..5f5f43a 100644 --- 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(0,)") call s:command("-bar -bang -nargs=* -complete=customlist,s:EditComplete Glog :execute s:Log('grep',)") @@ -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()]