func (repo *Repository) DefaultNoteRef() (string, error) { var ref [1]int8 cref := (*C.char)(&ref[0]) ecode := C.git_note_default_ref(&cref, repo.git_repository) if ecode != git_SUCCESS { return "", gitError() } return C.GoString(cref), nil }
// DefaultNoteRef returns the default notes reference for a repository func (v *Repository) DefaultNoteRef() (string, error) { var ptr *C.char runtime.LockOSThread() defer runtime.UnlockOSThread() if ret := C.git_note_default_ref(&ptr, v.ptr); ret < 0 { return "", MakeGitError(ret) } return C.GoString(ptr), nil }
// DefaultRef returns the default notes reference for a repository func (c *NoteCollection) DefaultRef() (string, error) { buf := C.git_buf{} runtime.LockOSThread() defer runtime.UnlockOSThread() if ret := C.git_note_default_ref(&buf, c.repo.ptr); ret < 0 { return "", MakeGitError(ret) } ret := C.GoString(buf.ptr) C.git_buf_free(&buf) return ret, nil }