diff options
| author | lhchavez <[email protected]> | 2020-02-23 14:49:04 +0000 |
|---|---|---|
| committer | lhchavez <[email protected]> | 2020-02-23 14:49:04 +0000 |
| commit | 627447092fa24035ed3cd4cf31932dbef6f5a57f (patch) | |
| tree | 48a9122be45522cf1ec72535cec18fd701db55d2 /config.go | |
| parent | 03339f731aba66baacab3fd67e7b2d185cdacb33 (diff) | |
| parent | 06764f48dce903bf95701c6ef75ad0fe46c0dedf (diff) | |
Merge remote-tracking branch 'upstream/master' into more-annotated-commit
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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() |
