diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index fcdc94b..f95af69 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2322,27 +2322,21 @@ function! s:github_url(opts, ...) abort return root . '/commits/' . branch endif elseif path =~# '^\.git/refs/tags/' - return root . '/releases/tag/' . matchstr(path,'[^/]\+$') - elseif path =~# '^\.git/refs/.' - return root . '/commits/' . matchstr(path,'[^/]\+$') + return root . '/releases/tag/' . path[15:-1] + elseif path =~# '^\.git/refs/remotes/[^/]\+/.' + return root . '/commits/' . matchstr(path,'remotes/[^/]\+/\zs.*') elseif path =~# '.git/\%(config$\|hooks\>\)' return root . '/admin' elseif path =~# '^\.git\>' return root endif - if a:opts.revision =~# '^[[:alnum:]._-]\+:' - let commit = matchstr(a:opts.revision,'^[^:]*') - elseif a:opts.commit =~# '^\d\=$' - let local = matchstr(a:opts.repo.head_ref(),'\