Feature request: Support a list of key-value push options in addition to map
Author: matheuscscpCreated Jan 28, 2025Updated Oct 1, 2026
Labelsenhancementgood first issuehelp wantedno-autoclose
The protocol already supports a list of key-value options:
https://github.com/go-git/go-git/blob/a11a8bc121877f5baeb30204aada90dffdf5e7ed/remote.go#L329
But go-git exposed a map in the API:
https://github.com/go-git/go-git/blob/a11a8bc121877f5baeb30204aada90dffdf5e7ed/options.go#L290
I propose adding a new field to the API: OptionList []struct{Key,Value string} (equivalent)
Then in remote.go we append the items from OptionList after the ones from Options.
The use case is specifying multiple merge_request.label option keys for GitLab, see this thread in the Flux channel of CNCF Slack: https://cloud-native.slack.com/archives/CLAJ40HV3/p1738077947682019
Source: go-git/go-git