[bitbake-devel] [PATCH 2/2] fetch/git: Add pack-refs command to mirror handling code

Richard Purdie richard.purdie at linuxfoundation.org
Sun Jan 28 11:21:48 UTC 2018

We've noticed issues on our infrastucture iterating over the many
tag/branch/head reference files that some git repositories may contain.

By issuing the pack-refs command, we move these all to a single file
which speeds up operations with the mirror repos in the downloads
directory in general.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
 lib/bb/fetch2/git.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 5ef8cd6..d34ea1d 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -363,6 +363,7 @@ class Git(FetchMethod):
             progresshandler = GitProgressHandler(d)
             runfetchcmd(fetch_cmd, d, log=progresshandler, workdir=ud.clonedir)
             runfetchcmd("%s prune-packed" % ud.basecmd, d, workdir=ud.clonedir)
+            runfetchcmd("%s pack-refs --all" % ud.basecmd, d, workdir=ud.clonedir)
             runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d, workdir=ud.clonedir)

More information about the bitbake-devel mailing list