From e804fb67b75697f98f500f67ed11e891e370bd04 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 17 Aug 2021 23:11:05 -0400 Subject: [PATCH] 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. --- autoload/rhubarb.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autoload/rhubarb.vim b/autoload/rhubarb.vim index 2a1d54d..7c3af24 100644 --- a/autoload/rhubarb.vim +++ b/autoload/rhubarb.vim @@ -265,11 +265,7 @@ function! rhubarb#FugitiveUrl(...) abort elseif path =~# '^\.git\>' return root endif - if opts.commit =~# '^\d\=$' - return '' - else - let commit = opts.commit - endif + let commit = opts.commit if get(opts, 'type', '') ==# 'tree' || opts.path =~# '/$' let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g') elseif get(opts, 'type', '') ==# 'blob' || opts.path =~# '[^/]$'