aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2022-09-23 21:28:08 +0700
committerMax <msuraev@sysmocom.de>2022-09-23 21:40:32 +0700
commit115262d8412d420fb4a2ff26da6002b75a7a4ade (patch)
treecbebaac95d0c8b0d5479b8bfff9c1d2511303972
parentd1047b38030601d3e2d2d5b18d4f221c30d271ec (diff)
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
-rw-r--r--scripts/obs/lib/git.py2
1 files changed, 1 insertions, 1 deletions
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 @@ def clone(project, fetch=False):
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)