aboutsummaryrefslogtreecommitdiffstats
path: root/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go11
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