From 42e9ee3f95ba1b5fb2dc97e37fb5eff5f8d75f07 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 12 Apr 2021 13:11:23 -0400 Subject: [PATCH] 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. --- autoload/rhubarb.vim | 6 +----- plugin/rhubarb.vim | 8 ++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/autoload/rhubarb.vim b/autoload/rhubarb.vim index fd216a6..4c3ed23 100644 --- a/autoload/rhubarb.vim +++ b/autoload/rhubarb.vim @@ -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 diff --git a/plugin/rhubarb.vim b/plugin/rhubarb.vim index 4575b5f..e834f14 100644 --- a/plugin/rhubarb.vim +++ b/plugin/rhubarb.vim @@ -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