mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-06 20:24:29 +08:00
Autodetect Enterprise HTTP servers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user