Autodetect Enterprise HTTP servers

This commit is contained in:
Tim Pope
2021-09-30 20:10:47 -04:00
parent 977b3ccbad
commit d4da65e238

View File

@@ -291,6 +291,9 @@ function! rhubarb#FugitiveUrl(...) abort
else else
return '' return ''
endif 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) if empty(root)
return '' return ''
endif endif