mirror of
https://github.com/openSUSE/osc.git
synced 2025-11-26 14:39:50 +01:00
Implement 'git-obs pr dump' command to store pull request information on disk
This commit is contained in:
@@ -92,6 +92,8 @@ class Repo(GiteaModel):
|
||||
cwd: Optional[str] = None,
|
||||
use_http: bool = False,
|
||||
add_remotes: bool = False,
|
||||
reference: Optional[str] = None,
|
||||
reference_if_able: Optional[str] = None,
|
||||
ssh_private_key_path: Optional[str] = None,
|
||||
ssh_strict_host_key_checking: bool = True,
|
||||
) -> str:
|
||||
@@ -105,6 +107,8 @@ class Repo(GiteaModel):
|
||||
:param cwd: Working directory. Defaults to the current working directory.
|
||||
:param use_http: Whether to use``clone_url`` for cloning over http(s) instead of ``ssh_url`` for cloning over SSH.
|
||||
:param add_remotes: Determine and add 'parent' or 'fork' remotes to the cloned repo.
|
||||
:param reference: Reuse objects from the specified local repository, error out if the repository doesn't exist.
|
||||
:param reference_if_able: Reuse objects from the specified local repository, only print warning if the repository doesn't exist.
|
||||
"""
|
||||
import shlex
|
||||
|
||||
@@ -161,6 +165,12 @@ class Repo(GiteaModel):
|
||||
if branch:
|
||||
cmd += ["--branch", branch]
|
||||
|
||||
if reference:
|
||||
cmd += ["--reference", reference]
|
||||
|
||||
if reference_if_able:
|
||||
cmd += ["--reference-if-able", reference_if_able]
|
||||
|
||||
if quiet:
|
||||
cmd += ["--quiet"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user