(label: str, sha: str)
| 169 | |
| 170 | |
| 171 | def _validate_sha(label: str, sha: str) -> str: |
| 172 | if not sha or not SHA_RE.match(sha): |
| 173 | raise ValueError(f"Invalid {label} SHA: {sha!r}") |
| 174 | return sha |
| 175 | |
| 176 | |
| 177 | def _ensure_commit_exists(sha: str, cwd: Path) -> None: |
no test coverage detected