getDiffOutput returns the full diff between two refs.
(dir, from, to string)
| 176 | |
| 177 | // getDiffOutput returns the full diff between two refs. |
| 178 | func getDiffOutput(dir, from, to string) (string, error) { |
| 179 | cmd := exec.Command("git", "diff", from, to) |
| 180 | cmd.Dir = dir |
| 181 | output, err := cmd.Output() |
| 182 | if err != nil { |
| 183 | return "", err |
| 184 | } |
| 185 | return string(output), nil |
| 186 | } |