diff options
author | Sören Bohn <soeren.bohn@ppro.com> | 2021-10-26 15:49:15 +0200 |
---|---|---|
committer | Sören Bohn <soeren@lambda-complex.org> | 2021-10-26 16:08:54 +0200 |
commit | e729edb00d36e9bd19f99dfa493984233b0dccfa (patch) | |
tree | 3cb555f90071aa32768c6a49a90d52d47eda64be /remote.go | |
parent | 99457e570d34320b12fb4fcd0f054f3d0b1d3eec (diff) | |
download | go-git-e729edb00d36e9bd19f99dfa493984233b0dccfa.tar.gz |
plumbing: packp, Add encoding for push-options. Fixes #268.
go-git: Add field `Options` to `PushOptions`, wire functionality.
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 } |