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

Method ItemPath

repository.go:863–876  ·  view source on GitHub ↗
(item RepositoryItem)

Source from the content-addressed store, hash-verified

861)
862
863func (r *Repository) ItemPath(item RepositoryItem) (string, error) {
864 var c_buf C.git_buf
865 defer C.git_buf_dispose(&c_buf)
866
867 runtime.LockOSThread()
868 defer runtime.UnlockOSThread()
869
870 ret := C.git_repository_item_path(&c_buf, r.ptr, C.git_repository_item_t(item))
871 runtime.KeepAlive(r)
872 if ret < 0 {
873 return "", MakeGitError(ret)
874 }
875 return C.GoString(c_buf.ptr), nil
876}

Callers 1

TestRepositoryItemPathFunction · 0.80

Calls 1

MakeGitErrorFunction · 0.85

Tested by 1

TestRepositoryItemPathFunction · 0.64