Implement git_repository_set_config (#735) #743

Merged
github-actions[bot] merged 2 commits from cherry-pick-535940877-release-0.27 into release-0.27 2021-03-07 19:55:18 -06:00
1 changed files with 1 additions and 7 deletions
Showing only changes of commit 04b593c8e8 - Show all commits

View File

@ -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
} }