()
| 153 | } |
| 154 | |
| 155 | func (v *Repository) Config() (*Config, error) { |
| 156 | config := new(Config) |
| 157 | |
| 158 | runtime.LockOSThread() |
| 159 | defer runtime.UnlockOSThread() |
| 160 | |
| 161 | ret := C.git_repository_config(&config.ptr, v.ptr) |
| 162 | runtime.KeepAlive(v) |
| 163 | if ret < 0 { |
| 164 | return nil, MakeGitError(ret) |
| 165 | } |
| 166 | |
| 167 | runtime.SetFinalizer(config, (*Config).Free) |
| 168 | return config, nil |
| 169 | } |
| 170 | |
| 171 | // SetConfig sets the configuration file for this repository. |
| 172 | // |