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:
Tim Pope
2021-04-12 13:11:23 -04:00
parent 1c36bf8668
commit 42e9ee3f95
2 changed files with 3 additions and 11 deletions

View File

@@ -47,11 +47,7 @@ function! s:repo_homepage() abort
if exists('b:rhubarb_homepage')
return b:rhubarb_homepage
endif
if exists('*FugitiveRemoteUrl')
let remote = FugitiveRemoteUrl()
else
let remote = fugitive#repo().config('remote.origin.url')
endif
let remote = FugitiveRemoteUrl()
let homepage = rhubarb#HomepageForUrl(remote)
if !empty(homepage)
let b:rhubarb_homepage = homepage

View File

@@ -14,14 +14,10 @@ let g:dispatch_compilers['hub'] = 'git'
function! s:Config() abort
if exists('*FugitiveFind')
let dir = FugitiveFind('.git/config')[0:-8]
return filereadable(dir . '/config') ? readfile(dir . '/config') : []
else
let dir = get(b:, 'git_dir', '')
let common_dir = b:git_dir . '/commondir'
if filereadable(dir . '/commondir')
let dir .= '/' . readfile(common_dir)[0]
endif
return []
endif
return filereadable(dir . '/config') ? readfile(dir . '/config') : []
endfunction
augroup rhubarb