MCPcopy Create free account
hub / github.com/go-git/go-git / NewConfig

Function NewConfig

config/config.go:131–143  ·  view source on GitHub ↗

NewConfig returns a new empty Config.

()

Source from the content-addressed store, hash-verified

129
130// NewConfig returns a new empty Config.
131func NewConfig() *Config {
132 config := &Config{
133 Remotes: make(map[string]*RemoteConfig),
134 Submodules: make(map[string]*Submodule),
135 Branches: make(map[string]*Branch),
136 URLs: make(map[string]*URL),
137 Raw: format.New(),
138 }
139
140 config.Pack.Window = DefaultPackWindow
141
142 return config
143}
144
145// ReadConfig reads a config file from a io.Reader.
146func ReadConfig(r io.Reader) (*Config, error) {

Callers 15

ConfigMethod · 0.92
TestSetConfigBaseMethod · 0.92
TestSetConfigTemporalMethod · 0.92
TestCommitMethod · 0.92
TestSetConfigInvalidMethod · 0.92
ConfigMethod · 0.92
TestUnmarshalMethod · 0.85
TestMarshalMethod · 0.85

Calls

no outgoing calls

Tested by 15

TestSetConfigBaseMethod · 0.74
TestSetConfigTemporalMethod · 0.74
TestCommitMethod · 0.74
TestUnmarshalMethod · 0.68
TestMarshalMethod · 0.68
TestUnmarshalMarshalMethod · 0.68
TestLoadConfigXDGMethod · 0.68
TestRemoveUrlOptionsMethod · 0.68