(root: string)
| 144 | } |
| 145 | |
| 146 | export async function gitCommit(root: string): Promise<string | undefined> { |
| 147 | try { |
| 148 | const { stdout } = await execFileAsync("git", ["-C", root, "rev-parse", "HEAD"]); |
| 149 | return stdout.trim() || undefined; |
| 150 | } catch { |
| 151 | return undefined; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Report whether the git working tree at root is clean (no staged, unstaged, |
no outgoing calls
no test coverage detected