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