aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/test/upload_pack.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2018-08-14 09:57:46 +0200
committerGitHub <noreply@github.com>2018-08-14 09:57:46 +0200
commita28c2ce44695f13ddf28748958f236afd8e0b544 (patch)
tree107dd441cd96b44b4f3994d26faf5f0bfae933fc /plumbing/transport/test/upload_pack.go
parentc3740924da0d1929cb523c85ae9da3b456b901ea (diff)
parent8d75d239e93474e4287870e4e5143da14e2c360d (diff)
downloadgo-git-a28c2ce44695f13ddf28748958f236afd8e0b544.tar.gz
Merge pull request #906 from src-d/perf/packfile-reads
Improve packfile reading performance
Diffstat (limited to 'plumbing/transport/test/upload_pack.go')
-rw-r--r--plumbing/transport/test/upload_pack.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/plumbing/transport/test/upload_pack.go b/plumbing/transport/test/upload_pack.go
index 70e4e56..8709ac2 100644
--- a/plumbing/transport/test/upload_pack.go
+++ b/plumbing/transport/test/upload_pack.go
@@ -258,11 +258,8 @@ func (s *UploadPackSuite) checkObjectNumber(c *C, r io.Reader, n int) {
b, err := ioutil.ReadAll(r)
c.Assert(err, IsNil)
buf := bytes.NewBuffer(b)
- scanner := packfile.NewScanner(buf)
storage := memory.NewStorage()
- d, err := packfile.NewDecoder(scanner, storage)
- c.Assert(err, IsNil)
- _, err = d.Decode()
+ err = packfile.UpdateObjectStorage(storage, buf)
c.Assert(err, IsNil)
c.Assert(len(storage.Objects), Equals, n)
}