From 433dfa9e7c2254f47de69d47f7d614ca296ac834 Mon Sep 17 00:00:00 2001 From: Roman Nesytov Date: Thu, 27 Jun 2024 23:07:02 +0300 Subject: [PATCH] fix(lazygit): fix browsing private git hostings --- lua/lazyvim/util/lazygit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/util/lazygit.lua b/lua/lazyvim/util/lazygit.lua index d69941df..630d009a 100644 --- a/lua/lazyvim/util/lazygit.lua +++ b/lua/lazyvim/util/lazygit.lua @@ -166,7 +166,7 @@ function M.browse() for _, line in ipairs(lines) do local name, url = line:match("(%S+)%s+(%S+)%s+%(fetch%)") if name and url then - if url:find("git@github.com") or url:find("git@bitbucket.org") or url:find("git@gitlab.com") then + if url:find("git@") == 1 then url = url:gsub("git@(%S+):", "https://%1/"):gsub(".git$", "") end table.insert(remotes, { name = name, url = url })