Run a git command in the repository root. Args: args: Arguments to pass after `git`. capture_output: Whether to capture and return stdout. Returns: Captured stdout when capture_output is true; otherwise an empty string. Raises: ReleaseError: Git exits w
(args: list[str], *, capture_output: bool = False)
| 61 | |
| 62 | |
| 63 | def git(args: list[str], *, capture_output: bool = False) -> str: |
| 64 | """Run a git command in the repository root. |
| 65 | |
| 66 | Args: |
| 67 | args: Arguments to pass after `git`. |
| 68 | capture_output: Whether to capture and return stdout. |
| 69 | |
| 70 | Returns: |
| 71 | Captured stdout when capture_output is true; otherwise an empty string. |
| 72 | |
| 73 | Raises: |
| 74 | ReleaseError: Git exits with a non-zero status. |
| 75 | """ |
| 76 | return run_command(["git", *args], capture_output=capture_output) |
| 77 | |
| 78 | |
| 79 | def ensure_clean_worktree() -> None: |
no test coverage detected