Remove guard against index stage in :Gbrowse handler
This parameter can now always be directly used within a URL, without any sanity checking
This commit is contained in:
parent
ac904e806d
commit
14daf094d9
@ -2333,11 +2333,7 @@ function! s:github_url(opts, ...) abort
|
|||||||
elseif path =~# '^\.git\>'
|
elseif path =~# '^\.git\>'
|
||||||
return root
|
return root
|
||||||
endif
|
endif
|
||||||
if a:opts.commit =~# '^\d\=$'
|
let commit = a:opts.commit
|
||||||
let commit = a:opts.repo.rev_parse('HEAD')
|
|
||||||
else
|
|
||||||
let commit = a:opts.commit
|
|
||||||
endif
|
|
||||||
if get(a:opts, 'type', '') ==# 'tree' || a:opts.path =~# '/$'
|
if get(a:opts, 'type', '') ==# 'tree' || a:opts.path =~# '/$'
|
||||||
let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g')
|
let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g')
|
||||||
elseif a:opts.type == 'blob'
|
elseif a:opts.type == 'blob'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user