msuraev submitted this change.
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.