Tighten loose regexp

This commit is contained in:
Tim Pope
2018-06-25 17:27:42 -04:00
parent 7e835bb967
commit 135aeb6b5f

View File

@@ -237,7 +237,7 @@ function! rhubarb#fugitive_url(opts, ...) abort
return root . '/releases/tag/' . path[15:-1] return root . '/releases/tag/' . path[15:-1]
elseif path =~# '^\.git/refs/remotes/[^/]\+/.' elseif path =~# '^\.git/refs/remotes/[^/]\+/.'
return root . '/commits/' . matchstr(path,'remotes/[^/]\+/\zs.*') return root . '/commits/' . matchstr(path,'remotes/[^/]\+/\zs.*')
elseif path =~# '.git/\%(config$\|hooks\>\)' elseif path =~# '^\.git/\%(config$\|hooks\>\)'
return root . '/admin' return root . '/admin'
elseif path =~# '^\.git\>' elseif path =~# '^\.git\>'
return root return root