diff options
author | Santiago M. Mola <santi@mola.io> | 2017-07-27 17:17:34 +0200 |
---|---|---|
committer | Santiago M. Mola <santi@mola.io> | 2017-08-01 13:01:59 +0200 |
commit | e5c6fa237776870483cbe227d7f7ea943f35cb12 (patch) | |
tree | d8708626c6e4bdacdf3d3b796a17025908b6606b /plumbing/format/config/section.go | |
parent | 1e70916ca7e4d5c0ad00edbfd1877e06d7587fc6 (diff) | |
download | go-git-e5c6fa237776870483cbe227d7f7ea943f35cb12.tar.gz |
config: preserve option order on config marshalling
Do not change order of options (e.g. in RemoteConfig)
when serializing for any option whose value has not changed.
Diffstat (limited to 'plumbing/format/config/section.go')
-rw-r--r-- | plumbing/format/config/section.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/format/config/section.go b/plumbing/format/config/section.go index eeefe84..4a17e3b 100644 --- a/plumbing/format/config/section.go +++ b/plumbing/format/config/section.go @@ -134,8 +134,8 @@ func (s *Subsection) AddOption(key string, value string) *Subsection { // SetOption adds a new Option to the Subsection. If the option already exists, is replaced. // The updated Subsection is returned. -func (s *Subsection) SetOption(key string, value string) *Subsection { - s.Options = s.Options.withSettedOption(key, value) +func (s *Subsection) SetOption(key string, value ...string) *Subsection { + s.Options = s.Options.withSettedOption(key, value...) return s } |