(c *C)
| 1389 | } |
| 1390 | |
| 1391 | func (s *RemoteSuite) TestUseRefDeltas(c *C) { |
| 1392 | url := c.MkDir() |
| 1393 | |
| 1394 | _, err := PlainInit(url, true) |
| 1395 | c.Assert(err, IsNil) |
| 1396 | |
| 1397 | fs := fixtures.ByURL("https://github.com/git-fixtures/tags.git").One().DotGit() |
| 1398 | sto := filesystem.NewStorage(fs, cache.NewObjectLRUDefault()) |
| 1399 | |
| 1400 | r := NewRemote(sto, &config.RemoteConfig{ |
| 1401 | Name: DefaultRemoteName, |
| 1402 | URLs: []string{url}, |
| 1403 | }) |
| 1404 | |
| 1405 | ar := packp.NewAdvRefs() |
| 1406 | |
| 1407 | ar.Capabilities.Add(capability.OFSDelta) |
| 1408 | c.Assert(r.useRefDeltas(ar), Equals, false) |
| 1409 | |
| 1410 | ar.Capabilities.Delete(capability.OFSDelta) |
| 1411 | c.Assert(r.useRefDeltas(ar), Equals, true) |
| 1412 | } |
| 1413 | |
| 1414 | func (s *RemoteSuite) TestPushRequireRemoteRefs(c *C) { |
| 1415 | f := fixtures.Basic().One() |
nothing calls this directly
no test coverage detected