diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index fdc32f6..3aa6a6c 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -5103,11 +5103,9 @@ call s:command('-buffer -bang -range=-1 -nargs=? -complete=customlist,s:BlameCom " Section: :Gbrowse -call s:command("-bar -bang -range=-1 -nargs=* -complete=customlist,fugitive#CompleteObject Gbrowse", "Browse") - let s:redirects = {} -function! s:BrowseCommand(line1, line2, range, count, bang, mods, reg, arg, args) abort +function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abort let dir = s:Dir() exe s:DirCheck(dir) try @@ -5133,13 +5131,13 @@ function! s:BrowseCommand(line1, line2, range, count, bang, mods, reg, arg, args else let expanded = s:Expand(rev) endif - let cdir = FugitiveVimPath(fugitive#CommonDir(s:Dir())) + let cdir = FugitiveVimPath(fugitive#CommonDir(dir)) for subdir in ['tags/', 'heads/', 'remotes/'] if expanded !~# '^[./]' && filereadable(cdir . '/refs/' . subdir . expanded) let expanded = '.git/refs/' . subdir . expanded endif endfor - let full = s:Generate(expanded) + let full = fugitive#Find(expanded, dir) let commit = '' if full =~? '^fugitive:' let [pathdir, commit, path] = s:DirCommitFile(full) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index cba1c7e..2c8a452 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -389,3 +389,5 @@ exe 'command! -bar -bang -nargs=0 -complete=customlist,fugitive#CompleteObject G exe 'command! -bar -bang -nargs=0 -complete=customlist,fugitive#CompleteObject Gdelete exe fugitive#DeleteCommand(, , +"", 0, "", , [])' exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#CompleteObject Gmove exe fugitive#MoveCommand( , , +"", 0, "", , [])' exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#RenameComplete Grename exe fugitive#RenameCommand(, , +"", 0, "", , [])' + +exe 'command! -bar -bang -range=-1 -nargs=* -complete=customlist,fugitive#CompleteObject Gbrowse exe fugitive#BrowseCommand(, , +"", 0, "", , [])'