* Extract the SSH host from a git URL for error messaging. * Matches the SSH format user@host:path (e.g., git@github.com:owner/repo.git).
(gitUrl: string)
| 779 | * Matches the SSH format user@host:path (e.g., git@github.com:owner/repo.git). |
| 780 | */ |
| 781 | function extractSshHost(gitUrl: string): string | null { |
| 782 | const match = gitUrl.match(/^[^@]+@([^:]+):/) |
| 783 | return match?.[1] ?? null |
| 784 | } |
| 785 | |
| 786 | /** |
| 787 | * Git clone operation (exported for testing) |