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

Method SetConfig

repository.go:175–186  ·  view source on GitHub ↗

SetConfig sets the configuration file for this repository. This configuration file will be used for all configuration queries involving this repository.

(c *Config)

Source from the content-addressed store, hash-verified

173// This configuration file will be used for all configuration queries involving
174// this repository.
175func (v *Repository) SetConfig(c *Config) error {
176 runtime.LockOSThread()
177 defer runtime.UnlockOSThread()
178
179 ret := C.git_repository_set_config(v.ptr, c.ptr)
180 runtime.KeepAlive(v)
181 runtime.KeepAlive(c)
182 if ret < 0 {
183 return MakeGitError(ret)
184 }
185 return nil
186}
187
188func (v *Repository) Index() (*Index, error) {
189 var ptr *C.git_index

Callers 1

TestRepositorySetConfigFunction · 0.80

Calls 1

MakeGitErrorFunction · 0.85

Tested by 1

TestRepositorySetConfigFunction · 0.64