Skip to content

Commit 53be2c0

Browse files
authored
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 5af9380.
1 parent 1407565 commit 53be2c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lua/lazy/manage/git.lua

+1-3
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ end
196196

197197
---@param repo string
198198
function M.get_origin(repo)
199-
local config = M.get_config(repo)
200-
local remote = config["clone.defaultRemoteName"] or "origin"
201-
return config["remote." .. remote .. ".url"] or config["remote.origin.url"]
199+
return M.get_config(repo)["remote.origin.url"]
202200
end
203201

204202
---@param repo string

lua/lazy/manage/task/git.lua

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ M.clone = {
7575
args[#args + 1] = "--recurse-submodules"
7676
end
7777

78+
args[#args + 1] = "--origin=origin"
79+
7880
args[#args + 1] = "--progress"
7981

8082
if self.plugin.branch then

0 commit comments

Comments
 (0)