From b5a3775b64d3f76a5c4a998215252623f39c5cfc Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 21 Aug 2021 21:22:11 -0400 Subject: [PATCH] Remove unused keys from :GBrowse options I was hoping to one day introduce a new, backwards incompatible API here, but adoption has gotten widespread enough that I think we're stuck with it. So let's go ahead and clean up some cruft that I've verified is not in use in any known plugin. A couple of plugins do use repo.rev_parse(), but only inside conditionals should never be triggered. --- autoload/fugitive.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 8078f85..f80a0aa 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -6966,7 +6966,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo let line1 = +matchstr(blame[0], blame_regex) let line2 = +matchstr(blame[-1], blame_regex) else - call s:throw("Can't browse to uncommitted change") + throw "fugitive: can't browse to uncommitted change" endif endif endif @@ -6995,10 +6995,8 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo let opts = { \ 'git_dir': dir, - \ 'dir': dir, - \ 'repo': fugitive#repo(dir), + \ 'repo': {'git_dir': dir}, \ 'remote': raw, - \ 'revision': 'No longer provided', \ 'remote_name': remote, \ 'commit': commit, \ 'path': path, @@ -7015,7 +7013,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo endfor if empty(url) - call s:throw("No GBrowse handler installed for '".raw."'") + throw "fugitive: no GBrowse handler installed for '".raw."'" endif return s:BrowserOpen(url, a:mods, a:bang)