(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func withIsolatedGitConfig(t *testing.T) { |
| 17 | t.Helper() |
| 18 | |
| 19 | // https://git-scm.com/docs/git-config#ENVIRONMENT |
| 20 | // Set the global git config to a temporary file |
| 21 | tmpDir := t.TempDir() |
| 22 | configFile := filepath.Join(tmpDir, ".gitconfig") |
| 23 | t.Setenv("GIT_CONFIG_GLOBAL", configFile) |
| 24 | |
| 25 | // And disable git reading the system config |
| 26 | t.Setenv("GIT_CONFIG_NOSYSTEM", "true") |
| 27 | } |
| 28 | |
| 29 | func configureTestCredentialHelper(t *testing.T, key string) { |
| 30 | t.Helper() |
no test coverage detected