GitService
class GitService()Sandbox git namespace.
GitService.__init__
def __init__(transport: AsyncTransport) -> NoneGitService.clone
async def clone(url: str,
path: str,
*,
branch: Optional[str] = None,
commit_id: Optional[str] = None,
depth: Optional[int] = None,
insecure_skip_tls: bool = False,
username: Optional[str] = None,
password: Optional[str] = None,
timeout: Optional[float] = None) -> NoneClone a repository, optionally shallow and with per-call TLS relaxation.
GitService.init
async def init(path: str,
*,
bare: bool = False,
initial_branch: Optional[str] = None) -> NoneGitService.status
async def status(path: str) -> GitStatusReturn git status.
GitService.list_branches
async def list_branches(path: str) -> ListResultList branch names as {items, next_cursor}.
GitService.list_remotes
async def list_remotes(path: str) -> ListResult[JsonObject]GitService.history
async def history(path: str) -> ListResultList commits, newest first.
GitService.create_branch
async def create_branch(path: str, name: str) -> NoneCreate a branch.
GitService.add_remote
async def add_remote(path: str, name: str, url: str) -> NoneGitService.delete_branch
async def delete_branch(path: str, name: str) -> NoneDelete a branch.
GitService.checkout_branch
async def checkout_branch(path: str, branch: str) -> NoneCheckout a branch.
GitService.add
async def add(path: str, files: Sequence[str]) -> NoneStage files.
GitService.reset
async def reset(path: str,
*,
mode: Optional[str] = None,
target: Optional[str] = None,
files: Optional[Sequence[str]] = None) -> NoneGitService.restore
async def restore(path: str,
files: Sequence[str],
*,
staged: Optional[bool] = None,
worktree: Optional[bool] = None,
source: Optional[str] = None) -> NoneGitService.commit
async def commit(path: str,
message: str,
*,
author: str,
email: str,
allow_empty: bool = False) -> GitCommitResponseCommit staged changes, optionally allowing an empty commit.
GitService.pull
async def pull(path: str,
*,
username: Optional[str] = None,
password: Optional[str] = None,
branch: Optional[str] = None,
remote: Optional[str] = None,
timeout: Optional[float] = None) -> NonePull from the configured or named remote.
GitService.push
async def push(path: str,
*,
username: Optional[str] = None,
password: Optional[str] = None,
branch: Optional[str] = None,
remote: Optional[str] = None,
set_upstream: bool = False,
timeout: Optional[float] = None) -> NonePush to the configured or named remote.
GitService.get_config
async def get_config(key: str,
*,
path: Optional[str] = None,
scope: str = 'global') -> Optional[str]GitService.set_config
async def set_config(key: str,
value: str,
*,
path: Optional[str] = None,
scope: str = 'global') -> NoneSyncGitService
class SyncGitService()Sandbox git namespace.
SyncGitService.__init__
def __init__(impl: GitService, bridge: SyncBridge) -> NoneSyncGitService.add
def add(path: str, files: Sequence[str]) -> NoneStage files.
SyncGitService.add_remote
def add_remote(path: str, name: str, url: str) -> NoneSyncGitService.checkout_branch
def checkout_branch(path: str, branch: str) -> NoneCheckout a branch.
SyncGitService.clone
def clone(url: str,
path: str,
*,
branch: Optional[str] = None,
commit_id: Optional[str] = None,
depth: Optional[int] = None,
insecure_skip_tls: bool = False,
username: Optional[str] = None,
password: Optional[str] = None,
timeout: Optional[float] = None) -> NoneClone a repository, optionally shallow and with per-call TLS relaxation.
SyncGitService.commit
def commit(path: str,
message: str,
*,
author: str,
email: str,
allow_empty: bool = False) -> GitCommitResponseCommit staged changes, optionally allowing an empty commit.
SyncGitService.create_branch
def create_branch(path: str, name: str) -> NoneCreate a branch.
SyncGitService.delete_branch
def delete_branch(path: str, name: str) -> NoneDelete a branch.
SyncGitService.get_config
def get_config(key: str,
*,
path: Optional[str] = None,
scope: str = 'global') -> Optional[str]SyncGitService.history
def history(path: str) -> ListResultList commits, newest first.
SyncGitService.init
def init(path: str, *, bare: bool = False, initial_branch: Optional[str] = None) -> NoneSyncGitService.list_branches
def list_branches(path: str) -> ListResultList branch names as {items, next_cursor}.
SyncGitService.list_remotes
def list_remotes(path: str) -> ListResult[JsonObject]SyncGitService.pull
def pull(path: str,
*,
username: Optional[str] = None,
password: Optional[str] = None,
branch: Optional[str] = None,
remote: Optional[str] = None,
timeout: Optional[float] = None) -> NonePull from the configured or named remote.
SyncGitService.push
def push(path: str,
*,
username: Optional[str] = None,
password: Optional[str] = None,
branch: Optional[str] = None,
remote: Optional[str] = None,
set_upstream: bool = False,
timeout: Optional[float] = None) -> NonePush to the configured or named remote.
SyncGitService.reset
def reset(path: str,
*,
mode: Optional[str] = None,
target: Optional[str] = None,
files: Optional[Sequence[str]] = None) -> NoneSyncGitService.restore
def restore(path: str,
files: Sequence[str],
*,
staged: Optional[bool] = None,
worktree: Optional[bool] = None,
source: Optional[str] = None) -> NoneSyncGitService.set_config
def set_config(key: str,
value: str,
*,
path: Optional[str] = None,
scope: str = 'global') -> NoneSyncGitService.status
def status(path: str) -> GitStatusReturn git status.
GitCommitResponse
GitCommitResponse = _gen.toolbox.CommitResponseGitStatus
GitStatus = _gen.toolbox.StatusResponse