1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-23 13:36:53 +01:00

Add 'depth' argument to gitea_api.Repo.clone() and clone_or_update()

This commit is contained in:
2025-10-31 14:56:51 +01:00
parent 84ee65271d
commit 2029b4933f
2 changed files with 10 additions and 1 deletions

View File

@@ -205,6 +205,7 @@ class Git:
*,
remote: Optional[str] = None,
commit: Optional[str] = None,
depth: Optional[int] = None,
force: bool = False,
):
"""
@@ -220,6 +221,8 @@ class Git:
remote = self.get_current_remote()
cmd = ["fetch", remote, f"pull/{pull_number}/head:{target_branch}"]
if depth:
cmd += ["--depth", str(depth)]
if force:
cmd += [
"--force",