diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-08-14 09:57:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 09:57:46 +0200 |
commit | a28c2ce44695f13ddf28748958f236afd8e0b544 (patch) | |
tree | 107dd441cd96b44b4f3994d26faf5f0bfae933fc /plumbing/transport/test/receive_pack.go | |
parent | c3740924da0d1929cb523c85ae9da3b456b901ea (diff) | |
parent | 8d75d239e93474e4287870e4e5143da14e2c360d (diff) | |
download | go-git-a28c2ce44695f13ddf28748958f236afd8e0b544.tar.gz |
Merge pull request #906 from src-d/perf/packfile-reads
Improve packfile reading performance
Diffstat (limited to 'plumbing/transport/test/receive_pack.go')
-rw-r--r-- | plumbing/transport/test/receive_pack.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go index 57f602d..5aea1c0 100644 --- a/plumbing/transport/test/receive_pack.go +++ b/plumbing/transport/test/receive_pack.go @@ -262,13 +262,16 @@ func (s *ReceivePackSuite) receivePackNoCheck(c *C, ep *transport.Endpoint, req.Packfile = s.emptyPackfile() } - return r.ReceivePack(context.Background(), req) + if s, err := r.ReceivePack(context.Background(), req); err != nil { + return s, err + } else { + return s, err + } } func (s *ReceivePackSuite) receivePack(c *C, ep *transport.Endpoint, req *packp.ReferenceUpdateRequest, fixture *fixtures.Fixture, callAdvertisedReferences bool) { - url := "" if fixture != nil { url = fixture.URL @@ -279,7 +282,6 @@ func (s *ReceivePackSuite) receivePack(c *C, ep *transport.Endpoint, ep.String(), url, callAdvertisedReferences, ) report, err := s.receivePackNoCheck(c, ep, req, fixture, callAdvertisedReferences) - c.Assert(err, IsNil, comment) if req.Capabilities.Supports(capability.ReportStatus) { c.Assert(report, NotNil, comment) |