DeleteBranch deletes the git branch in the repo
(branch string)
| 260 | |
| 261 | // DeleteBranch deletes the git branch in the repo |
| 262 | func (g *TestGitRepo) DeleteBranch(branch string) error { |
| 263 | // checkout the branch |
| 264 | cmd := exec.Command("git", []string{"branch", "-D", branch}...) |
| 265 | cmd.Dir = g.RepoDirectory |
| 266 | _, err := cmd.Output() |
| 267 | if err != nil { |
| 268 | return err |
| 269 | } |
| 270 | |
| 271 | return nil |
| 272 | } |
| 273 | |
| 274 | // Commit performs a git commit |
| 275 | func (g *TestGitRepo) Commit(message string) error { |