Unify helper.GitCommand and helper.GitCommandReader
These two functions repeat code that shouldn't be repeated (environment setup most notably).
Also, I like the interface of CommandReader better:
cmd, err := helper.NewGitCommand("foo")
if err != nil {
// failed to start command
}
defer cmd.Kill()
if err := cmd.Wait(); err != nil {
// command exited with failure? check exit status?
}
// happy path
I think defer cmd.Kill()
is nicer than helper.CleanUpProcessGroup(cmd)
.