Run a git command and return stdout.
(args: list[str])
| 147 | |
| 148 | |
| 149 | def _run_git(args: list[str]) -> str: |
| 150 | """Run a git command and return stdout.""" |
| 151 | result = subprocess.run( # noqa: S603 |
| 152 | ["git", *args], # noqa: S607 |
| 153 | capture_output=True, |
| 154 | text=True, |
| 155 | check=True, |
| 156 | ) |
| 157 | return result.stdout.strip() |
| 158 | |
| 159 | |
| 160 | def _get_diff(base: str) -> str: |