Add another guard to :Gbrowse support

Now that I've actually had time to assess things, it's clear this
parameter is only used as a way to convey the branch name and makes zero
sense.  So, it's going to get dropped sooner or later.
This commit is contained in:
Tim Pope
2015-12-01 03:34:10 -05:00
parent bcddf0951e
commit 28c489579f

View File

@@ -184,7 +184,7 @@ endfunction
" Section: Fugitive :Gbrowse support " Section: Fugitive :Gbrowse support
function! rhubarb#fugitive_url(opts, ...) abort function! rhubarb#fugitive_url(opts, ...) abort
if a:0 || type(a:opts) != type({}) || !has_key(a:opts, 'repo') if a:0 || type(a:opts) != type({}) || !has_key(a:opts, 'repo') || !has_key(a:opts, 'revision')
return '' return ''
endif endif
let root = s:homepage_for_url(get(a:opts, 'remote')) let root = s:homepage_for_url(get(a:opts, 'remote'))