DefaultRef returns the default notes reference for a repository
()
| 121 | |
| 122 | // DefaultRef returns the default notes reference for a repository |
| 123 | func (c *NoteCollection) DefaultRef() (string, error) { |
| 124 | buf := C.git_buf{} |
| 125 | |
| 126 | runtime.LockOSThread() |
| 127 | defer runtime.UnlockOSThread() |
| 128 | |
| 129 | ecode := C.git_note_default_ref(&buf, c.repo.ptr) |
| 130 | runtime.KeepAlive(c) |
| 131 | if ecode < 0 { |
| 132 | return "", MakeGitError(ecode) |
| 133 | } |
| 134 | |
| 135 | ret := C.GoString(buf.ptr) |
| 136 | C.git_buf_dispose(&buf) |
| 137 | |
| 138 | return ret, nil |
| 139 | } |
| 140 | |
| 141 | // Note |
| 142 | type Note struct { |