diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-11-29 18:01:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-29 18:01:24 +0100 |
commit | 7ced03216a47327d64f68c750114a96cfcbae38b (patch) | |
tree | a797b79d0a750972ba9809eb52691cb09f9b6383 /config/config.go | |
parent | c07c778ed043429427533e2fd7549a3d54b903f1 (diff) | |
parent | 18e6f9daa3899318d36b525b068837f49bc2c1cf (diff) | |
download | go-git-7ced03216a47327d64f68c750114a96cfcbae38b.tar.gz |
Merge pull request #667 from ferhatelmas/simplify
all: simplification
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/config/config.go b/config/config.go index 477eb35..fc4cd28 100644 --- a/config/config.go +++ b/config/config.go @@ -65,8 +65,8 @@ type Config struct { // NewConfig returns a new empty Config. func NewConfig() *Config { return &Config{ - Remotes: make(map[string]*RemoteConfig, 0), - Submodules: make(map[string]*Submodule, 0), + Remotes: make(map[string]*RemoteConfig), + Submodules: make(map[string]*Submodule), Raw: format.New(), } } @@ -290,13 +290,8 @@ func (c *RemoteConfig) unmarshal(s *format.Subsection) error { fetch = append(fetch, rs) } - var urls []string - for _, f := range c.raw.Options.GetAll(urlKey) { - urls = append(urls, f) - } - c.Name = c.raw.Name - c.URLs = urls + c.URLs = append([]string(nil), c.raw.Options.GetAll(urlKey)...) c.Fetch = fetch return nil |