mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
Provide config functions globally
This makes it easier to check for them with exists().
This commit is contained in:
@@ -2641,13 +2641,13 @@ function! s:Browse(bang,line1,count,...) abort
|
|||||||
let branch = s:repo().head()
|
let branch = s:repo().head()
|
||||||
endif
|
endif
|
||||||
if !empty(branch)
|
if !empty(branch)
|
||||||
let r = s:repo().git_chomp('config','branch.'.branch.'.remote')
|
let r = fugitive#Config('branch.'.branch.'.remote')
|
||||||
let m = s:repo().git_chomp('config','branch.'.branch.'.merge')[11:-1]
|
let m = fugitive#Config('branch.'.branch.'.merge')[11:-1]
|
||||||
if r ==# '.' && !empty(m)
|
if r ==# '.' && !empty(m)
|
||||||
let r2 = s:repo().git_chomp('config','branch.'.m.'.remote')
|
let r2 = fugitive#Config('branch.'.m.'.remote')
|
||||||
if r2 !~# '^\.\=$'
|
if r2 !~# '^\.\=$'
|
||||||
let r = r2
|
let r = r2
|
||||||
let m = s:repo().git_chomp('config','branch.'.m.'.merge')[11:-1]
|
let m = fugitive#Config('branch.'.m.'.merge')[11:-1]
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if empty(remote)
|
if empty(remote)
|
||||||
|
|||||||
@@ -168,6 +168,14 @@ function! FugitiveParse(...) abort
|
|||||||
throw v:errmsg
|
throw v:errmsg
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! FugitiveConfig(...) abort
|
||||||
|
return call('fugitive#Config', a:000)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! FugitiveRemoteUrl(...) abort
|
||||||
|
return call('fugitive#RemoteUrl', a:000)
|
||||||
|
endfunction
|
||||||
|
|
||||||
augroup fugitive
|
augroup fugitive
|
||||||
autocmd!
|
autocmd!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user