git clone --single-branch works only with ref names. It fails if
commit sha1 is set in layer configuration with this error:
fatal: Remote branch <commit sha1> not found in upstream origin

Cloning repository without using --single-branch should work for
refs and commit sha1.

[YOCTO #7505]

Signed-off-by: Ed Bartosh <[email protected]>
---
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py 
b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index a9909b8..3d2f8b0 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -260,8 +260,8 @@ class LocalhostBEController(BuildEnvironmentController):
                     self._shellcmd("git remote remove origin", localdirname)
                     self._shellcmd("git remote add origin \"%s\"" % giturl, 
localdirname)
                 else:
-                    logger.debug("localhostbecontroller: cloning %s:%s in %s" 
% (giturl, commit, localdirname))
-                    self._shellcmd("git clone \"%s\" --single-branch --branch 
\"%s\" \"%s\"" % (giturl, commit, localdirname))
+                    logger.debug("localhostbecontroller: cloning %s in %s" % 
(giturl, localdirname))
+                    self._shellcmd('git clone "%s" "%s"' % (giturl, 
localdirname))
 
             # branch magic name "HEAD" will inhibit checkout
             if commit != "HEAD":
-- 
2.1.4

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to