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

Method Next

note.go:233–247  ·  view source on GitHub ↗

Next returns the current item (note id & annotated id) and advances the iterator internally to the next item

()

Source from the content-addressed store, hash-verified

231// Next returns the current item (note id & annotated id) and advances the
232// iterator internally to the next item
233func (it *NoteIterator) Next() (noteId, annotatedId *Oid, err error) {
234 noteId, annotatedId = new(Oid), new(Oid)
235
236 runtime.LockOSThread()
237 defer runtime.UnlockOSThread()
238
239 ret := C.git_note_next(noteId.toC(), annotatedId.toC(), it.ptr)
240 runtime.KeepAlive(noteId)
241 runtime.KeepAlive(annotatedId)
242 runtime.KeepAlive(it)
243 if ret < 0 {
244 err = MakeGitError(ret)
245 }
246 return
247}

Callers 1

TestNoteIteratorFunction · 0.95

Calls 2

MakeGitErrorFunction · 0.85
toCMethod · 0.45

Tested by 1

TestNoteIteratorFunction · 0.76