(s: string)
| 129 | * could otherwise return arbitrary content that flows into shell contexts. |
| 130 | */ |
| 131 | export function isValidGitSha(s: string): boolean { |
| 132 | return /^[0-9a-f]{40}$/.test(s) || /^[0-9a-f]{64}$/.test(s) |
| 133 | } |
| 134 | |
| 135 | // --------------------------------------------------------------------------- |
| 136 | // readGitHead — parse .git/HEAD |
no outgoing calls
no test coverage detected