mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-06 12:14:26 +08:00
Remove ancient guard against legacy 'commit' parameter
People often copy and paste this plugin as a starting point for their own, so let's clean this up.
This commit is contained in:
@@ -265,11 +265,7 @@ function! rhubarb#FugitiveUrl(...) abort
|
|||||||
elseif path =~# '^\.git\>'
|
elseif path =~# '^\.git\>'
|
||||||
return root
|
return root
|
||||||
endif
|
endif
|
||||||
if opts.commit =~# '^\d\=$'
|
let commit = opts.commit
|
||||||
return ''
|
|
||||||
else
|
|
||||||
let commit = opts.commit
|
|
||||||
endif
|
|
||||||
if get(opts, 'type', '') ==# 'tree' || opts.path =~# '/$'
|
if get(opts, 'type', '') ==# 'tree' || opts.path =~# '/$'
|
||||||
let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g')
|
let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g')
|
||||||
elseif get(opts, 'type', '') ==# 'blob' || opts.path =~# '[^/]$'
|
elseif get(opts, 'type', '') ==# 'blob' || opts.path =~# '[^/]$'
|
||||||
|
|||||||
Reference in New Issue
Block a user