From 14daf094d90fe713186881323d41190420bb6319 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 26 Dec 2015 14:18:00 -0500 Subject: [PATCH] Remove guard against index stage in :Gbrowse handler This parameter can now always be directly used within a URL, without any sanity checking --- plugin/fugitive.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index a7113bd..fc7a475 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2333,11 +2333,7 @@ function! s:github_url(opts, ...) abort elseif path =~# '^\.git\>' return root endif - if a:opts.commit =~# '^\d\=$' - let commit = a:opts.repo.rev_parse('HEAD') - else - let commit = a:opts.commit - endif + let commit = a:opts.commit if get(a:opts, 'type', '') ==# 'tree' || a:opts.path =~# '/$' let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g') elseif a:opts.type == 'blob'