()
| 168 | */ |
| 169 | export async function ensureGitAvailable(): Promise<void> { |
| 170 | try { |
| 171 | await runOwnedCommand('git', ['--version'], { timeout: 5_000 }); |
| 172 | } catch { |
| 173 | throw new GitError( |
| 174 | 'git is not installed or not found on PATH', |
| 175 | 'GIT_NOT_AVAILABLE' |
| 176 | ); |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | // ─── Branch Name Validation ─────────────────────────────────────────────────── |
| 181 | |
| 182 | /** |
| 183 | * Validate a git branch name. |
| 184 | * Follows rules from `git check-ref-format --branch`: |
nothing calls this directly
no outgoing calls
no test coverage detected