PRUNERS/llvm_archer

Clone only HEAD from repositories when building for speedup.

Opened this issue · 0 comments

Currently, when the script pulls the repos from the git repos, it does a plain git clone REPONAME, which pulls the entire history of the repository. For the majority of installs, we don't require this, as we'll never need to checkout other branches, and pulling the entire history wastes a fair bit of bandwidth and time.

Is it possible to modify the script that when a specific branch/commit is not required that a git clone --depth=1 REPONAME is performed instead, such that we avoid this waste? It should speed up the installation a fair bit too!

The git_clone_or_pull function should only need minor adjustments, perhaps just checking if BRANCH and $3 is not defined, then add the extra argument --depth=1 to git clone. There is another potential optimisation for these branches/commit lookups, but I'm not too familiar with git to provide a direct recommendation.