From 5c844a75c6f5debb3b627f8df7789df495d63adb Mon Sep 17 00:00:00 2001 From: Mike Vink <59492084+ivi-vink@users.noreply.github.com> Date: Sat, 18 Jan 2025 13:10:46 +0100 Subject: fixup --- mut/neovim/lua/my/init.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'mut/neovim/lua/my/init.lua') diff --git a/mut/neovim/lua/my/init.lua b/mut/neovim/lua/my/init.lua index 993519f..b72ad31 100644 --- a/mut/neovim/lua/my/init.lua +++ b/mut/neovim/lua/my/init.lua @@ -326,6 +326,14 @@ local browse_git_remote = function(fugitive_data) end end assert((home and org and project and repo) or (home and repo)) + P(home, org, project, repo) + + local homes = { + ["ssh.dev.azure.com"] = "dev.azure.com", + } + if homes[home] then + home = homes[home] + end local urls = { ["bitbucket.org"] = { @@ -344,16 +352,16 @@ local browse_git_remote = function(fugitive_data) }, ["dev.azure.com"] = { ["tree"] = function(home, org, project, repo) - return "https://" .. home .. "/" .. org .. "/_git/" .. repo .. "?version=GB" .. fugitive_data.commit .. "&path=/" .. path + return "https://" .. home .. "/" .. org .. "/" .. project .. "/_git/" .. repo .. "?version=GB" .. fugitive_data.commit .. "&path=/" .. path end, ["blob"] = function(home, org, project, repo) - return "https://" .. home .. "/" .. org .. "/_git/" .. repo .. "?version=GB" .. fugitive_data.commit .. "&path=/" .. path + return "https://" .. home .. "/" .. org .. "/" .. project.. "/_git/" .. repo .. "?version=GB" .. fugitive_data.commit .. "&path=/" .. path end, ["commit"] = function(home, org, project, repo) - return "https://" .. home .. "/" .. org .. "/_git/" .. repo .. "/commit/" .. fugitive_data.commit + return "https://" .. home .. "/" .. org .. "/" .. project.. "/_git/" .. repo .. "/commit/" .. fugitive_data.commit end, ["ref"] = function(home, org, project, repo) - return "https://" .. home .. "/" .. org .. "/_git/" .. repo .. "/commit/" .. fugitive_data.commit + return "https://" .. home .. "/" .. org .. "/" .. project.. "/_git/" .. repo .. "/commit/" .. fugitive_data.commit end, }, ["gitlab.com"] = { -- cgit v1.2.3