diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-12-01 09:59:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-01 09:59:19 +0100 |
commit | c15bf1dff332873644290db0e186b8f5ad9b8fb2 (patch) | |
tree | 1dd79212333823b70f2792ad116864ea127e4a1c /remote.go | |
parent | 7de79aef5d4aa3100382d4df3e99525f9949e8d1 (diff) | |
download | go-git-c15bf1dff332873644290db0e186b8f5ad9b8fb2.tar.gz |
capabilities: full integration (#151)
* format/pktline: fix readPayloadLen err handling
* protocol/pakp: UploadReq validation and creation of capabilities
* protocol/pakp: AdvRef tests
* protocol/pakp: capability.List.Delete
* protocol: filter unsupported capabilities
* remote capability negociation
* transport: UploadRequest validation
* requested changes
Diffstat (limited to 'remote.go')
-rw-r--r-- | remote.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -171,11 +171,11 @@ func (r *Remote) getWantedReferences(spec []config.RefSpec) ([]*plumbing.Referen func (r *Remote) buildRequest( s storer.ReferenceStorer, o *FetchOptions, refs []*plumbing.Reference, ) (*packp.UploadPackRequest, error) { - req := packp.NewUploadPackRequest() + req := packp.NewUploadPackRequestFromCapabilities(r.advRefs.Capabilities) req.Depth = packp.DepthCommits(o.Depth) for _, ref := range refs { - req.Want(ref.Hash()) + req.Wants = append(req.Wants, ref.Hash()) } i, err := s.IterReferences() @@ -188,7 +188,7 @@ func (r *Remote) buildRequest( return nil } - req.Have(ref.Hash()) + req.Haves = append(req.Haves, ref.Hash()) return nil }) |