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

Method SetBool

config.go:276–290  ·  view source on GitHub ↗
(name string, value bool)

Source from the content-addressed store, hash-verified

274}
275
276func (c *Config) SetBool(name string, value bool) (err error) {
277 cname := C.CString(name)
278 defer C.free(unsafe.Pointer(cname))
279
280 runtime.LockOSThread()
281 defer runtime.UnlockOSThread()
282
283 ret := C.git_config_set_bool(c.ptr, cname, cbool(value))
284 runtime.KeepAlive(c)
285 if ret < 0 {
286 return MakeGitError(ret)
287 }
288
289 return nil
290}
291
292func (c *Config) SetMultivar(name, regexp, value string) (err error) {
293 cname := C.CString(name)

Callers 4

TestRepositorySetConfigFunction · 0.80
setupConfigFunction · 0.80
TestRemotePruneRefsFunction · 0.80
TestRemotePruneFunction · 0.80

Calls 3

cboolFunction · 0.85
MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by 4

TestRepositorySetConfigFunction · 0.64
setupConfigFunction · 0.64
TestRemotePruneRefsFunction · 0.64
TestRemotePruneFunction · 0.64