Git 1.8.1 (default in el7) does not support `-C`
Found this when I actually started adding tests and trying to use it.
`--git-dir=PATH/.git` is the replacement.
@@ -41,7 +41,7 @@ func (g *git) exec(command ...string) (string, error) {
}
func (g *git) streamExec(out, errOut io.Writer, command ...string) error {
- cmd := exec.Command("git", append([]string{"-C", g.path}, command...)...)
+ cmd := exec.Command("git", append([]string{"--git-dir", filepath.Join(g.path, ".git")}, command...)...)
cmd.Stdout = out
cmd.Stderr = errOut
return cmd.Run()
