Skip to contentSkip to conversation

fetch2/git: Enforce default remote name to "origin"

PATCH New Yuri D'Elia 1 participant 1 message Jul 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2/git: Enforce default remote name to "origin"

Enforce the default remote name to "origin", as assumed in numerous places.

This prevents build failures in case the system/user configuration sets this to a different value.

---
 lib/bb/fetch2/git.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/git.py +1 -1
index c7ff769fd..a65cd4bb2 100644
@@ -262,7 +262,7 @@ class Git(FetchMethod):
             for name in ud.names:
                 ud.unresolvedrev[name] = 'HEAD'
 
-        ud.basecmd = d.getVar("FETCHCMD_git") or "git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all"
+        ud.basecmd = d.getVar("FETCHCMD_git") or "git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all -c clone.defaultRemoteName=origin"
 
         write_tarballs = d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0"
         ud.write_tarballs = write_tarballs != "0" or ud.rebaseable
Signature · 1 line
2.45.2