msuraev submitted this change.

View Change

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
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(-)

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)

To view, visit change 29464. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I71629c244d2c29728a88871e83b20493341321c8
Gerrit-Change-Number: 29464
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <msuraev@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged