From 5af93806aaa33fd9e8b4a7a32e9f847a3ad64c2a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 28 Feb 2023 10:51:17 +0100 Subject: [PATCH] fix(git): honor clone.defaultRemoteName. Fixes #602 --- lua/lazy/manage/git.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/manage/git.lua b/lua/lazy/manage/git.lua index 116c5fe..2f37456 100644 --- a/lua/lazy/manage/git.lua +++ b/lua/lazy/manage/git.lua @@ -196,7 +196,9 @@ end ---@param repo string function M.get_origin(repo) - return M.get_config(repo)["remote.origin.url"] + local config = M.get_config(repo) + local remote = config["clone.defaultRemoteName"] or "origin" + return config["remote." .. remote .. ".url"] or config["remote.origin.url"] end ---@param repo string