Expose config settings and user signature.
Adds config() and user() to the fugitive#buffer() interface. Signed-off-by: Michael Geddes <vimmer@frog.wheelycreek.net>
This commit is contained in:
parent
7390538db0
commit
794c21484d
@ -1729,6 +1729,18 @@ function! fugitive#statusline(...)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:repo_config(conf) dict abort
|
||||||
|
return matchstr(system(s:repo().git_command('config').' '.a:conf),"[^\r\n]*")
|
||||||
|
endfun
|
||||||
|
|
||||||
|
function! s:repo_user() dict abort
|
||||||
|
let username=s:repo().config('user.name')
|
||||||
|
let useremail=s:repo().config('user.email')
|
||||||
|
return username.' <'.useremail.'>'
|
||||||
|
endfun
|
||||||
|
|
||||||
|
call s:add_methods('repo',['config', 'user'])
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|
||||||
" vim:set ft=vim ts=8 sw=2 sts=2:
|
" vim:set ft=vim ts=8 sw=2 sts=2:
|
||||||
|
Loading…
Reference in New Issue
Block a user