--- git helpers ---
()
| 243 | // --- git helpers --- |
| 244 | |
| 245 | func isGitRepo() bool { |
| 246 | cmd := exec.Command("git", "rev-parse", "--is-inside-work-tree") |
| 247 | out, err := cmd.Output() |
| 248 | return err == nil && strings.TrimSpace(string(out)) == "true" |
| 249 | } |
| 250 | |
| 251 | func getGitRepoRoot() string { |
| 252 | cmd := exec.Command("git", "rev-parse", "--show-toplevel") |
no test coverage detected