(t *testing.T)
| 153 | } |
| 154 | |
| 155 | func TestRemotePruneRefs(t *testing.T) { |
| 156 | t.Parallel() |
| 157 | repo := createTestRepo(t) |
| 158 | defer cleanupTestRepo(t, repo) |
| 159 | |
| 160 | config, err := repo.Config() |
| 161 | checkFatal(t, err) |
| 162 | defer config.Free() |
| 163 | |
| 164 | err = config.SetBool("remote.origin.prune", true) |
| 165 | checkFatal(t, err) |
| 166 | |
| 167 | remote, err := repo.Remotes.Create("origin", "https://github.com/libgit2/TestGitRepository") |
| 168 | checkFatal(t, err) |
| 169 | defer remote.Free() |
| 170 | |
| 171 | remote, err = repo.Remotes.Lookup("origin") |
| 172 | checkFatal(t, err) |
| 173 | defer remote.Free() |
| 174 | |
| 175 | if !remote.PruneRefs() { |
| 176 | t.Fatal("Expected remote to be configured to prune references") |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | func TestRemotePrune(t *testing.T) { |
| 181 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…