mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-06 12:14:26 +08:00
Open release page for tags on GitHub
This commit is contained in:
@@ -199,6 +199,8 @@ function! rhubarb#fugitive_url(opts, ...) abort
|
|||||||
else
|
else
|
||||||
return root . '/commits/' . branch
|
return root . '/commits/' . branch
|
||||||
endif
|
endif
|
||||||
|
elseif path =~# '^\.git/refs/tags/'
|
||||||
|
return root . '/releases/tag/' . path[15:-1]
|
||||||
elseif path =~# '^\.git/refs/.'
|
elseif path =~# '^\.git/refs/.'
|
||||||
return root . '/commits/' . matchstr(path,'[^/]\+$')
|
return root . '/commits/' . matchstr(path,'[^/]\+$')
|
||||||
elseif path =~# '.git/\%(config$\|hooks\>\)'
|
elseif path =~# '.git/\%(config$\|hooks\>\)'
|
||||||
@@ -226,9 +228,6 @@ function! rhubarb#fugitive_url(opts, ...) abort
|
|||||||
elseif get(a:opts, 'line2')
|
elseif get(a:opts, 'line2')
|
||||||
let url .= '#L' . a:opts.line1 . '-L' . a:opts.line2
|
let url .= '#L' . a:opts.line1 . '-L' . a:opts.line2
|
||||||
endif
|
endif
|
||||||
elseif a:opts.type == 'tag'
|
|
||||||
let commit = matchstr(getline(3),'^tag \zs.*')
|
|
||||||
let url = root . '/tree/' . commit
|
|
||||||
else
|
else
|
||||||
let url = root . '/commit/' . commit
|
let url = root . '/commit/' . commit
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user