runGitTest runs a git command in dir and fails the test on error.
(t *testing.T, dir string, args ...string)
| 14 | |
| 15 | // runGitTest runs a git command in dir and fails the test on error. |
| 16 | func runGitTest(t *testing.T, dir string, args ...string) { |
| 17 | t.Helper() |
| 18 | cmd := exec.Command("git", args...) |
| 19 | cmd.Dir = dir |
| 20 | if out, err := cmd.CombinedOutput(); err != nil { |
| 21 | t.Fatalf("git %v failed: %v\n%s", args, err, out) |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | // writeGarbageExternalDiff writes a shell script that emits non-diff output and |
| 26 | // returns its path. When git invokes it via GIT_EXTERNAL_DIFF / diff.external it |
no outgoing calls
no test coverage detected