aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/remote.go b/remote.go
index e2f9ae4..515f755 100644
--- a/remote.go
+++ b/remote.go
@@ -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
})