bitbake: fetch2/git.py: Optimize clone fall back when it is local
A file:// url should use "clone -l" to greatly speed up the clone in the case of a kernel when it is local. (Bitbake rev: 2bab2cc3ffe67ee2a308074a6e4c2c7be5636d2f) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
dee397af90
commit
fa7c2b0743
|
@ -188,7 +188,9 @@ class Git(FetchMethod):
|
|||
|
||||
# If the repo still doesn't exist, fallback to cloning it
|
||||
if not os.path.exists(ud.clonedir):
|
||||
clone_cmd = "%s clone --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir)
|
||||
if repourl.startswith("file://"):
|
||||
repourl = repourl[7:]
|
||||
clone_cmd = "%s clone -l --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir)
|
||||
if ud.proto.lower() != 'file':
|
||||
bb.fetch2.check_network_access(d, clone_cmd)
|
||||
runfetchcmd(clone_cmd, d)
|
||||
|
|
Loading…
Reference in New Issue