Add no clean flag (#154)

This commit is contained in:
Jay Gabriels
2021-09-28 20:12:11 -07:00
committed by GitHub
parent 323f25df51
commit 33e147b317
8 changed files with 56 additions and 18 deletions

View File

@@ -15,6 +15,7 @@ type Gitter interface {
Clean(scm.Repo) error
Checkout(scm.Repo) error
UpdateRemote(scm.Repo) error
FetchAll(scm.Repo) error
}
type GitClient struct{}
@@ -70,3 +71,9 @@ func (g GitClient) Reset(repo scm.Repo) error {
cmd.Dir = repo.HostPath
return cmd.Run()
}
func (g GitClient) FetchAll(repo scm.Repo) error {
cmd := exec.Command("git", "fetch", "--all")
cmd.Dir = repo.HostPath
return cmd.Run()
}