(c *C)
| 287 | } |
| 288 | |
| 289 | func (s *RemoteSuite) TestFetchWithDepth(c *C) { |
| 290 | r := NewRemote(memory.NewStorage(), &config.RemoteConfig{ |
| 291 | URLs: []string{s.GetBasicLocalRepositoryURL()}, |
| 292 | }) |
| 293 | |
| 294 | s.testFetch(c, r, &FetchOptions{ |
| 295 | Depth: 1, |
| 296 | RefSpecs: []config.RefSpec{ |
| 297 | config.RefSpec("+refs/heads/*:refs/remotes/origin/*"), |
| 298 | }, |
| 299 | }, []*plumbing.Reference{ |
| 300 | plumbing.NewReferenceFromStrings("refs/remotes/origin/master", "6ecf0ef2c2dffb796033e5a02219af86ec6584e5"), |
| 301 | plumbing.NewReferenceFromStrings("refs/remotes/origin/branch", "e8d3ffab552895c19b9fcf7aa264d277cde33881"), |
| 302 | plumbing.NewReferenceFromStrings("refs/tags/v1.0.0", "6ecf0ef2c2dffb796033e5a02219af86ec6584e5"), |
| 303 | }) |
| 304 | |
| 305 | c.Assert(r.s.(*memory.Storage).Objects, HasLen, 18) |
| 306 | } |
| 307 | |
| 308 | func (s *RemoteSuite) TestFetchWithDepthChange(c *C) { |
| 309 | r := NewRemote(memory.NewStorage(), &config.RemoteConfig{ |
nothing calls this directly
no test coverage detected