MCPcopy Create free account
hub / github.com/libgit2/git2go / NewConfig

Function NewConfig

config.go:60–71  ·  view source on GitHub ↗

NewConfig creates a new empty configuration object

()

Source from the content-addressed store, hash-verified

58
59// NewConfig creates a new empty configuration object
60func NewConfig() (*Config, error) {
61 config := new(Config)
62
63 runtime.LockOSThread()
64 defer runtime.UnlockOSThread()
65
66 if ret := C.git_config_new(&config.ptr); ret < 0 {
67 return nil, MakeGitError(ret)
68 }
69
70 return config, nil
71}
72
73// AddFile adds a file-backed backend to the config object at the specified level.
74func (c *Config) AddFile(path string, level ConfigLevel, force bool) error {

Callers

nothing calls this directly

Calls 1

MakeGitErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…