From 53be2c0ee1848fee2a47b89d184ad02410d3c319 Mon Sep 17 00:00:00 2001 From: Sean Baildon Date: Sun, 5 Mar 2023 13:09:15 +0000 Subject: [PATCH] fix(git): always set origin name when cloning (#622) * fix(git): force origin name * Revert "fix(git): honor clone.defaultRemoteName. Fixes #602" This reverts commit 5af93806aaa33fd9e8b4a7a32e9f847a3ad64c2a. --- lua/lazy/manage/git.lua | 4 +--- lua/lazy/manage/task/git.lua | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazy/manage/git.lua b/lua/lazy/manage/git.lua index 2f37456..116c5fe 100644 --- a/lua/lazy/manage/git.lua +++ b/lua/lazy/manage/git.lua @@ -196,9 +196,7 @@ end ---@param repo string function M.get_origin(repo) - local config = M.get_config(repo) - local remote = config["clone.defaultRemoteName"] or "origin" - return config["remote." .. remote .. ".url"] or config["remote.origin.url"] + return M.get_config(repo)["remote.origin.url"] end ---@param repo string diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index cc1d3c4..bcecfec 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -75,6 +75,8 @@ M.clone = { args[#args + 1] = "--recurse-submodules" end + args[#args + 1] = "--origin=origin" + args[#args + 1] = "--progress" if self.plugin.branch then