MCPcopy Create free account
hub / github.com/libgit2/git2go / ConfigFindProgramdata

Function ConfigFindProgramdata

config.go:441–454  ·  view source on GitHub ↗

ConfigFindProgramdata locate the path to the configuration file in ProgramData. Look for the file in %PROGRAMDATA%\Git\config used by portable git.

()

Source from the content-addressed store, hash-verified

439//
440// Look for the file in %PROGRAMDATA%\Git\config used by portable git.
441func ConfigFindProgramdata() (string, error) {
442 var buf C.git_buf
443 defer C.git_buf_dispose(&buf)
444
445 runtime.LockOSThread()
446 defer runtime.UnlockOSThread()
447
448 ret := C.git_config_find_programdata(&buf)
449 if ret < 0 {
450 return "", MakeGitError(ret)
451 }
452
453 return C.GoString(buf.ptr), nil
454}
455
456// OpenDefault opens the default config according to git rules
457func OpenDefault() (*Config, error) {

Callers

nothing calls this directly

Calls 1

MakeGitErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…