From ba6057c10125239a8a830b1518ab24dd67c851f4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 1 Dec 2015 18:55:13 -0500 Subject: [PATCH] Tighten handling of refs in :Gbrowse --- autoload/rhubarb.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/rhubarb.vim b/autoload/rhubarb.vim index a0cf95d..c7dc642 100644 --- a/autoload/rhubarb.vim +++ b/autoload/rhubarb.vim @@ -201,8 +201,8 @@ function! rhubarb#fugitive_url(opts, ...) abort endif elseif path =~# '^\.git/refs/tags/' return root . '/releases/tag/' . path[15:-1] - elseif path =~# '^\.git/refs/.' - return root . '/commits/' . matchstr(path,'[^/]\+$') + elseif path =~# '^\.git/refs/remotes/[^/]\+/.' + return root . '/commits/' . matchstr(path,'remotes/[^/]\+/\zs.*') elseif path =~# '.git/\%(config$\|hooks\>\)' return root . '/admin' elseif path =~# '^\.git\>'