msuraev has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29464 )
Change subject: scripts/obs: make shallow git clones ......................................................................
scripts/obs: make shallow git clones
While generating srcpkg we're not really interested in entire project history (which can be quite heavy) - let's only get the bare minimum from git.
Change-Id: I71629c244d2c29728a88871e83b20493341321c8 --- M scripts/obs/lib/git.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve msuraev: Looks good to me, approved
diff --git a/scripts/obs/lib/git.py b/scripts/obs/lib/git.py index 8dc57ae..59500e1 100644 --- a/scripts/obs/lib/git.py +++ b/scripts/obs/lib/git.py @@ -36,7 +36,7 @@
print(f"{project}: cloning {url}") os.makedirs(lib.config.path_cache, exist_ok=True) - lib.run_cmd(["git", "clone", url, repo_path]) + lib.run_cmd(["git", "clone", "--depth", "1", "--no-single-branch", url, repo_path])
lib.run_cmd(["git", "config", "user.name", "Osmocom OBS scripts"], cwd=repo_path)