Run a git command and return (returncode, stdout, stderr).
(args: list[str], cwd: Path = ROOT)
| 362 | # --------------------------------------------------------------------------- |
| 363 | |
| 364 | def run_git(args: list[str], cwd: Path = ROOT) -> tuple[int, str, str]: |
| 365 | """Run a git command and return (returncode, stdout, stderr).""" |
| 366 | result = subprocess.run( |
| 367 | ["git"] + args, |
| 368 | cwd=cwd, |
| 369 | capture_output=True, |
| 370 | text=True, |
| 371 | ) |
| 372 | return result.returncode, result.stdout.strip(), result.stderr.strip() |
| 373 | |
| 374 | |
| 375 | def create_branch(branch_name: str) -> bool: |
no outgoing calls
no test coverage detected