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

Function SearchPath

settings.go:42–55  ·  view source on GitHub ↗
(level ConfigLevel)

Source from the content-addressed store, hash-verified

40)
41
42func SearchPath(level ConfigLevel) (string, error) {
43 var buf C.git_buf
44 defer C.git_buf_dispose(&buf)
45
46 runtime.LockOSThread()
47 defer runtime.UnlockOSThread()
48
49 err := C._go_git_opts_get_search_path(C.int(level), &buf)
50 if err < 0 {
51 return "", MakeGitError(err)
52 }
53
54 return C.GoString(buf.ptr), nil
55}
56
57func SetSearchPath(level ConfigLevel, path string) error {
58 cpath := C.CString(path)

Callers 1

TestSearchPathFunction · 0.85

Calls 1

MakeGitErrorFunction · 0.85

Tested by 1

TestSearchPathFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…