()
| 312 | } |
| 313 | |
| 314 | func (g *TestGitRepo) GetCommit() (string, error) { |
| 315 | cmd := exec.Command("git", "rev-parse", "--verify", "HEAD") |
| 316 | cmd.Dir = g.RepoDirectory |
| 317 | b, err := cmd.Output() |
| 318 | if err != nil { |
| 319 | return "", err |
| 320 | } |
| 321 | return strings.TrimSpace(string(b)), nil |
| 322 | } |
| 323 | |
| 324 | // RemoveAll deletes the test git repo |
| 325 | func (g *TestGitRepo) RemoveAll() error { |