From d4da65e238a676c1e8a6e1880ca348c2a474c98c Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 30 Sep 2021 20:10:47 -0400 Subject: [PATCH] Autodetect Enterprise HTTP servers --- autoload/rhubarb.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/rhubarb.vim b/autoload/rhubarb.vim index 584185c..1f4ff47 100644 --- a/autoload/rhubarb.vim +++ b/autoload/rhubarb.vim @@ -291,6 +291,9 @@ function! rhubarb#FugitiveUrl(...) abort else return '' endif + if empty(root) && exists('fugitive#RemoteHttpHeaders') && get(fugitive#RemoteHttpHeaders(opts), 'server', '') =~# '^GitHub Babel ' + let root = matchstr(opts.remote, '^https\=://[^/:@]\+\%(:\d\+\)\=/\(.\{-\}\)\ze\%(\.git\)\=/\=$') + endif if empty(root) return '' endif