Implement git_repository_set_config (#735) #743
|
@ -170,15 +170,9 @@ func (v *Repository) Config() (*Config, error) {
|
||||||
// This configuration file will be used for all configuration queries involving
|
// This configuration file will be used for all configuration queries involving
|
||||||
// this repository.
|
// this repository.
|
||||||
func (v *Repository) SetConfig(c *Config) error {
|
func (v *Repository) SetConfig(c *Config) error {
|
||||||
runtime.LockOSThread()
|
C.git_repository_set_config(v.ptr, c.ptr)
|
||||||
defer runtime.UnlockOSThread()
|
|
||||||
|
|
||||||
ret := C.git_repository_set_config(v.ptr, c.ptr)
|
|
||||||
runtime.KeepAlive(v)
|
runtime.KeepAlive(v)
|
||||||
runtime.KeepAlive(c)
|
runtime.KeepAlive(c)
|
||||||
if ret < 0 {
|
|
||||||
return MakeGitError(ret)
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue