mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-07 04:34:27 +08:00
Drop support for Fugitive older than 3.0
There was a bug here anyways in the use of b:git_dir instead of l:git_dir.
This commit is contained in:
@@ -47,11 +47,7 @@ function! s:repo_homepage() abort
|
|||||||
if exists('b:rhubarb_homepage')
|
if exists('b:rhubarb_homepage')
|
||||||
return b:rhubarb_homepage
|
return b:rhubarb_homepage
|
||||||
endif
|
endif
|
||||||
if exists('*FugitiveRemoteUrl')
|
let remote = FugitiveRemoteUrl()
|
||||||
let remote = FugitiveRemoteUrl()
|
|
||||||
else
|
|
||||||
let remote = fugitive#repo().config('remote.origin.url')
|
|
||||||
endif
|
|
||||||
let homepage = rhubarb#HomepageForUrl(remote)
|
let homepage = rhubarb#HomepageForUrl(remote)
|
||||||
if !empty(homepage)
|
if !empty(homepage)
|
||||||
let b:rhubarb_homepage = homepage
|
let b:rhubarb_homepage = homepage
|
||||||
|
|||||||
@@ -14,14 +14,10 @@ let g:dispatch_compilers['hub'] = 'git'
|
|||||||
function! s:Config() abort
|
function! s:Config() abort
|
||||||
if exists('*FugitiveFind')
|
if exists('*FugitiveFind')
|
||||||
let dir = FugitiveFind('.git/config')[0:-8]
|
let dir = FugitiveFind('.git/config')[0:-8]
|
||||||
|
return filereadable(dir . '/config') ? readfile(dir . '/config') : []
|
||||||
else
|
else
|
||||||
let dir = get(b:, 'git_dir', '')
|
return []
|
||||||
let common_dir = b:git_dir . '/commondir'
|
|
||||||
if filereadable(dir . '/commondir')
|
|
||||||
let dir .= '/' . readfile(common_dir)[0]
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
return filereadable(dir . '/config') ? readfile(dir . '/config') : []
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
augroup rhubarb
|
augroup rhubarb
|
||||||
|
|||||||
Reference in New Issue
Block a user