aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorSören Bohn <soeren.bohn@ppro.com>2021-10-26 15:49:15 +0200
committerSören Bohn <soeren@lambda-complex.org>2021-10-26 16:08:54 +0200
commite729edb00d36e9bd19f99dfa493984233b0dccfa (patch)
tree3cb555f90071aa32768c6a49a90d52d47eda64be /remote.go
parent99457e570d34320b12fb4fcd0f054f3d0b1d3eec (diff)
downloadgo-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.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index 9f2995d..aeef005 100644
--- a/remote.go
+++ b/remote.go
@@ -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
}