diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2021-11-01 22:52:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 22:52:38 +0100 |
commit | 3211a7a12a0ec2922d257fb14f09c6ecfb0b7c77 (patch) | |
tree | 667f1a41e4223ac6c255463500a05a6d8ceab349 /remote.go | |
parent | ed3b10c0489949843abf071e3ce2697c0c65f26d (diff) | |
parent | e729edb00d36e9bd19f99dfa493984233b0dccfa (diff) | |
download | go-git-3211a7a12a0ec2922d257fb14f09c6ecfb0b7c77.tar.gz |
Merge pull request #399 from S-Bohn/add-push-options
Remote: PushOptions add push-options
Diffstat (limited to 'remote.go')
-rw-r--r-- | remote.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -319,6 +319,13 @@ func (r *Remote) newReferenceUpdateRequest( } } + if ar.Capabilities.Supports(capability.PushOptions) { + _ = req.Capabilities.Set(capability.PushOptions) + for k, v := range o.Options { + req.Options = append(req.Options, &packp.Option{Key: k, Value: v}) + } + } + if err := r.addReferencesToUpdate(o.RefSpecs, localRefs, remoteRefs, req, o.Prune); err != nil { return nil, err } |