diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-09-11 20:23:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-11 20:23:36 +0200 |
commit | 032ec287ec496117dc85cd0e9c9224b2b17f5398 (patch) | |
tree | 582a03b677b2a4c34c46c83f6511ad141c7b3ccb /plumbing/format/packfile/encoder_test.go | |
parent | bb3217ce5d5ed682a5c830c40ea031d3c92a8a7e (diff) | |
parent | 52c1f982ea0004de419d1a7f69d7eaf8b8d6b659 (diff) | |
download | go-git-032ec287ec496117dc85cd0e9c9224b2b17f5398.tar.gz |
Merge pull request #587 from keybase/strib/skip-compression-gh-master
config: support a configurable, and turn-off-able, pack.window
Diffstat (limited to 'plumbing/format/packfile/encoder_test.go')
-rw-r--r-- | plumbing/format/packfile/encoder_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/format/packfile/encoder_test.go b/plumbing/format/packfile/encoder_test.go index b5b0c42..2cb9094 100644 --- a/plumbing/format/packfile/encoder_test.go +++ b/plumbing/format/packfile/encoder_test.go @@ -26,7 +26,7 @@ func (s *EncoderSuite) SetUpTest(c *C) { } func (s *EncoderSuite) TestCorrectPackHeader(c *C) { - hash, err := s.enc.Encode([]plumbing.Hash{}) + hash, err := s.enc.Encode([]plumbing.Hash{}, 10) c.Assert(err, IsNil) hb := [20]byte(hash) @@ -47,7 +47,7 @@ func (s *EncoderSuite) TestCorrectPackWithOneEmptyObject(c *C) { _, err := s.store.SetEncodedObject(o) c.Assert(err, IsNil) - hash, err := s.enc.Encode([]plumbing.Hash{o.Hash()}) + hash, err := s.enc.Encode([]plumbing.Hash{o.Hash()}, 10) c.Assert(err, IsNil) // PACK + VERSION(2) + OBJECT NUMBER(1) @@ -74,13 +74,13 @@ func (s *EncoderSuite) TestMaxObjectSize(c *C) { o.SetType(plumbing.CommitObject) _, err := s.store.SetEncodedObject(o) c.Assert(err, IsNil) - hash, err := s.enc.Encode([]plumbing.Hash{o.Hash()}) + hash, err := s.enc.Encode([]plumbing.Hash{o.Hash()}, 10) c.Assert(err, IsNil) c.Assert(hash.IsZero(), Not(Equals), true) } func (s *EncoderSuite) TestHashNotFound(c *C) { - h, err := s.enc.Encode([]plumbing.Hash{plumbing.NewHash("BAD")}) + h, err := s.enc.Encode([]plumbing.Hash{plumbing.NewHash("BAD")}, 10) c.Assert(h, Equals, plumbing.ZeroHash) c.Assert(err, NotNil) c.Assert(err, Equals, plumbing.ErrObjectNotFound) |