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)

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29464
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I71629c244d2c29728a88871e83b20493341321c8
Gerrit-Change-Number: 29464
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to