diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-11-01 01:38:35 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-11-01 01:38:35 +0100 |
commit | 6badbeb07eb5cc0b1be201f5d8cc8193e30bcf54 (patch) | |
tree | 73f18bf34ef70fd747c90a70fe1835dd39094af2 /clients/http | |
parent | c6349552c1c54ea114b92ae23fc840f68f6551f4 (diff) | |
download | go-git-6badbeb07eb5cc0b1be201f5d8cc8193e30bcf54.tar.gz |
clients: capabilities improvement
Diffstat (limited to 'clients/http')
-rw-r--r-- | clients/http/git_upload_pack.go | 4 | ||||
-rw-r--r-- | clients/http/git_upload_pack_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clients/http/git_upload_pack.go b/clients/http/git_upload_pack.go index bc99fd8..6960be1 100644 --- a/clients/http/git_upload_pack.go +++ b/clients/http/git_upload_pack.go @@ -38,8 +38,8 @@ func (s *GitUploadPackService) Info() (*common.GitUploadPackInfo, error) { defer res.Body.Close() - dec := pktline.NewDecoder(res.Body) - return common.NewGitUploadPackInfo(dec) + i := common.NewGitUploadPackInfo() + return i, i.Decode(pktline.NewDecoder(res.Body)) } func (s *GitUploadPackService) Fetch(r *common.GitUploadPackRequest) (io.ReadCloser, error) { diff --git a/clients/http/git_upload_pack_test.go b/clients/http/git_upload_pack_test.go index c90a259..b870259 100644 --- a/clients/http/git_upload_pack_test.go +++ b/clients/http/git_upload_pack_test.go @@ -34,7 +34,7 @@ func (s *SuiteRemote) TestCapabilities(c *C) { info, err := r.Info() c.Assert(err, IsNil) - c.Assert(info.Capabilities.Get("agent"), HasLen, 1) + c.Assert(info.Capabilities.Get("agent").Values, HasLen, 1) } func (s *SuiteRemote) TestFetch(c *C) { |