summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-02-23 15:08:45 +0000
committerlhchavez <[email protected]>2020-02-23 15:08:45 +0000
commit3c88bd9f1aebc53ea9d77937829f8c155aa834c3 (patch)
tree8556d00fb42f2fcab5ba748e49e21e1141b9d604 /config.go
parentc75e0221d70bc471917aa3de34ca1ead1a747987 (diff)
parent21d618136f415486d95965e75af80c0e6688a0d5 (diff)
Merge remote-tracking branch 'upstream/master' into cherrypick-commit
Diffstat (limited to 'config.go')
-rw-r--r--config.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/config.go b/config.go
index ab9af38..7260089 100644
--- a/config.go
+++ b/config.go
@@ -134,7 +134,7 @@ func (c *Config) LookupString(name string) (string, error) {
if ret < 0 {
return "", MakeGitError(ret)
}
- defer C.git_buf_free(&valBuf)
+ defer C.git_buf_dispose(&valBuf)
return C.GoString(valBuf.ptr), nil
}
@@ -344,7 +344,7 @@ func (c *Config) OpenLevel(parent *Config, level ConfigLevel) (*Config, error) {
}
// OpenOndisk creates a new config instance containing a single on-disk file
-func OpenOndisk(parent *Config, path string) (*Config, error) {
+func OpenOndisk(path string) (*Config, error) {
cpath := C.CString(path)
defer C.free(unsafe.Pointer(cpath))
@@ -390,7 +390,7 @@ func (iter *ConfigIterator) Free() {
func ConfigFindGlobal() (string, error) {
var buf C.git_buf
- defer C.git_buf_free(&buf)
+ defer C.git_buf_dispose(&buf)
runtime.LockOSThread()
defer runtime.UnlockOSThread()
@@ -405,7 +405,7 @@ func ConfigFindGlobal() (string, error) {
func ConfigFindSystem() (string, error) {
var buf C.git_buf
- defer C.git_buf_free(&buf)
+ defer C.git_buf_dispose(&buf)
runtime.LockOSThread()
defer runtime.UnlockOSThread()
@@ -420,7 +420,7 @@ func ConfigFindSystem() (string, error) {
func ConfigFindXDG() (string, error) {
var buf C.git_buf
- defer C.git_buf_free(&buf)
+ defer C.git_buf_dispose(&buf)
runtime.LockOSThread()
defer runtime.UnlockOSThread()
@@ -438,7 +438,7 @@ func ConfigFindXDG() (string, error) {
// Look for the file in %PROGRAMDATA%\Git\config used by portable git.
func ConfigFindProgramdata() (string, error) {
var buf C.git_buf
- defer C.git_buf_free(&buf)
+ defer C.git_buf_dispose(&buf)
runtime.LockOSThread()
defer runtime.UnlockOSThread()