From ade1fdde290f0325120101edf6ff546251137ae9 Mon Sep 17 00:00:00 2001 From: Byoungchan Lee Date: Wed, 3 Feb 2021 23:15:39 +0900 Subject: [PATCH] Update repository.go to add a comment for the public API and fix Runtime issue. --- repository.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/repository.go b/repository.go index 1094287..ff176b5 100644 --- a/repository.go +++ b/repository.go @@ -165,12 +165,17 @@ func (v *Repository) Config() (*Config, error) { return config, nil } +// SetConfig sets the configuration file for this repository. +// +// This configuration file will be used for all configuration queries involving +// this repository. func (v *Repository) SetConfig(c *Config) error { runtime.LockOSThread() defer runtime.UnlockOSThread() ret := C.git_repository_set_config(v.ptr, c.ptr) runtime.KeepAlive(v) + runtime.KeepAlive(c) if ret < 0 { return MakeGitError(ret) }