diff options
author | Santiago M. Mola <santi@mola.io> | 2016-11-28 09:57:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-28 09:57:38 +0100 |
commit | 68893edf9ddc3de181431f1552e3b773cb66f080 (patch) | |
tree | f45e5fa18e10168a278b7d0ed7dea984ff9969f7 /remote_test.go | |
parent | f9adb3565b36ba1573102f954d0ee916009efac2 (diff) | |
download | go-git-68893edf9ddc3de181431f1552e3b773cb66f080.tar.gz |
remove old types from transport and use packp (#142)
* protocol: move UploadPackRequest to protocol.
* UploadPackRequest is now defined as an embedding of UploadRequest and
UploadHaves.
* Move http encoding specific code from UploadPackRequest to transport/http.
* rename UlReq to UploadRequest
* packp: move AdvRefs Encoder/Decoder to Encode/Decode methods.
* packp: move UploadRequest Encoder/Decoder to Encode/Decode methods.
* packp: Remove transport.UploadPackInfo in favor of packp. AdvRefs.
Diffstat (limited to 'remote_test.go')
-rw-r--r-- | remote_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/remote_test.go b/remote_test.go index 4df8767..ff543f2 100644 --- a/remote_test.go +++ b/remote_test.go @@ -54,10 +54,10 @@ func (s *RemoteSuite) TestInfo(c *C) { r := newRemote(nil, &config.RemoteConfig{Name: "foo", URL: RepositoryFixture}) r.client = &MockClient{} - c.Assert(r.Info(), IsNil) + c.Assert(r.AdvertisedReferences(), IsNil) c.Assert(r.Connect(), IsNil) - c.Assert(r.Info(), NotNil) - c.Assert(r.Info().Capabilities.Get("ofs-delta"), NotNil) + c.Assert(r.AdvertisedReferences(), NotNil) + c.Assert(r.AdvertisedReferences().Capabilities.Get("ofs-delta"), NotNil) } func (s *RemoteSuite) TestDefaultBranch(c *C) { @@ -180,11 +180,11 @@ func (s *RemoteSuite) TestRef(c *C) { err := r.Connect() c.Assert(err, IsNil) - ref, err := r.Ref(plumbing.HEAD, false) + ref, err := r.Reference(plumbing.HEAD, false) c.Assert(err, IsNil) c.Assert(ref.Name(), Equals, plumbing.HEAD) - ref, err = r.Ref(plumbing.HEAD, true) + ref, err = r.Reference(plumbing.HEAD, true) c.Assert(err, IsNil) c.Assert(ref.Name(), Equals, plumbing.ReferenceName("refs/heads/master")) } @@ -196,7 +196,7 @@ func (s *RemoteSuite) TestRefs(c *C) { err := r.Connect() c.Assert(err, IsNil) - iter, err := r.Refs() + iter, err := r.References() c.Assert(err, IsNil) c.Assert(iter, NotNil) } |