The page you navigated to () does not exist, so we brought you to the closest page to it.
You have switched from the to the variant of this site. There is no equivalent of . We have taken you to the closest page in the variant.
2.1.9
GitStatus
Package: flyte.git
A class representing the status of a git repository.
Parameters
class GitStatus(
is_valid: bool,
is_tree_clean: bool,
remote_url: str,
repo_dir: pathlib.Path,
commit_sha: str,
)| Parameter | Type | Description |
|---|---|---|
is_valid |
bool |
Whether git repository is valid |
is_tree_clean |
bool |
Whether working tree is clean |
remote_url |
str |
Remote URL in HTTPS format |
repo_dir |
pathlib.Path |
Repository root directory |
commit_sha |
str |
Current commit SHA |
Methods
| Method | Description |
|---|---|
build_url() |
Build a git URL for the given path. |
from_current_repo() |
Discover git information from the current repository. |
build_url()
def build_url(
path: pathlib.Path | str,
line_number: int,
) -> strBuild a git URL for the given path.
| Parameter | Type | Description |
|---|---|---|
path |
pathlib.Path | str |
Path to a file |
line_number |
int |
Line number of the code file |
Returns: Path relative to repo_dir
from_current_repo()
def from_current_repo()Discover git information from the current repository.
If Git is not installed or .git does not exist, returns GitStatus with is_valid=False.
Returns: GitStatus instance with discovered git information