AddFile adds a file-backed backend to the config object at the specified level.
(path string, level ConfigLevel, force bool)
| 72 | |
| 73 | // AddFile adds a file-backed backend to the config object at the specified level. |
| 74 | func (c *Config) AddFile(path string, level ConfigLevel, force bool) error { |
| 75 | cpath := C.CString(path) |
| 76 | defer C.free(unsafe.Pointer(cpath)) |
| 77 | |
| 78 | runtime.LockOSThread() |
| 79 | defer runtime.UnlockOSThread() |
| 80 | |
| 81 | ret := C.git_config_add_file_ondisk(c.ptr, cpath, C.git_config_level_t(level), nil, cbool(force)) |
| 82 | runtime.KeepAlive(c) |
| 83 | if ret < 0 { |
| 84 | return MakeGitError(ret) |
| 85 | } |
| 86 | |
| 87 | return nil |
| 88 | } |
| 89 | |
| 90 | func (c *Config) LookupInt32(name string) (int32, error) { |
| 91 | var out C.int32_t |
nothing calls this directly
no test coverage detected