aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2021-11-01 22:52:38 +0100
committerGitHub <noreply@github.com>2021-11-01 22:52:38 +0100
commit3211a7a12a0ec2922d257fb14f09c6ecfb0b7c77 (patch)
tree667f1a41e4223ac6c255463500a05a6d8ceab349 /remote.go
parented3b10c0489949843abf071e3ce2697c0c65f26d (diff)
parente729edb00d36e9bd19f99dfa493984233b0dccfa (diff)
downloadgo-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.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index b74f431..426bde9 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
}