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 /remote.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 'remote.go')
-rw-r--r-- | remote.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -797,17 +797,21 @@ func referencesToHashes(refs storer.ReferenceStorer) ([]plumbing.Hash, error) { func pushHashes( ctx context.Context, sess transport.ReceivePackSession, - sto storer.EncodedObjectStorer, + s storage.Storer, req *packp.ReferenceUpdateRequest, hs []plumbing.Hash, ) (*packp.ReportStatus, error) { rd, wr := io.Pipe() req.Packfile = rd + config, err := s.Config() + if err != nil { + return nil, err + } done := make(chan error) go func() { - e := packfile.NewEncoder(wr, sto, false) - if _, err := e.Encode(hs); err != nil { + e := packfile.NewEncoder(wr, s, false) + if _, err := e.Encode(hs, config.Pack.Window); err != nil { done <- wr.CloseWithError(err) return } |