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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user