Skip to content

Commit

Permalink
Add ssh://git@ to origin url base (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereOverfl0w authored and tpope committed Apr 10, 2017
1 parent 0c12c7e commit 9032c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/rhubarb.vim
Expand Up @@ -30,7 +30,7 @@ function! rhubarb#homepage_for_url(url) abort
for domain in domains
let domain_pattern .= '\|' . escape(split(domain, '://')[-1], '.')
endfor
let base = matchstr(a:url, '^\%(https\=://\|git://\|git@\)\=\zs\('.domain_pattern.'\)[/:].\{-\}\ze\%(\.git\)\=$')
let base = matchstr(a:url, '^\%(https\=://\|git://\|git@\|ssh://git@\)\=\zs\('.domain_pattern.'\)[/:].\{-\}\ze\%(\.git\)\=$')
if index(domains, 'http://' . matchstr(base, '^[^:/]*')) >= 0
return 'http://' . tr(base, ':', '/')
elseif !empty(base)
Expand Down

0 comments on commit 9032c18

Please sign in to comment.