MCPcopy Index your code
hub / github.com/go-git/go-git / NewConfig

Function NewConfig

config/config.go:141–153  ·  view source on GitHub ↗

NewConfig returns a new empty Config.

()

Source from the content-addressed store, hash-verified

139
140// NewConfig returns a new empty Config.
141func NewConfig() *Config {
142 config := &Config{
143 Remotes: make(map[string]*RemoteConfig),
144 Submodules: make(map[string]*Submodule),
145 Branches: make(map[string]*Branch),
146 URLs: make(map[string]*URL),
147 Raw: format.New(),
148 }
149
150 config.Pack.Window = DefaultPackWindow
151
152 return config
153}
154
155// ReadConfig reads a config file from a io.Reader.
156func 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…