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

Function odbForEachCallback

odb.go:212–225  ·  view source on GitHub ↗

export odbForEachCallback

(id *C.git_oid, handle unsafe.Pointer)

Source from the content-addressed store, hash-verified

210
211//export odbForEachCallback
212func odbForEachCallback(id *C.git_oid, handle unsafe.Pointer) C.int {
213 data, ok := pointerHandles.Get(handle).(*odbForEachCallbackData)
214 if !ok {
215 panic("could not retrieve handle")
216 }
217
218 err := data.callback(newOidFromC(id))
219 if err != nil {
220 *data.errorTarget = err
221 return C.int(ErrorCodeUser)
222 }
223
224 return C.int(ErrorCodeOK)
225}
226
227func (v *Odb) ForEach(callback OdbForEachCallback) error {
228 var err error

Callers

nothing calls this directly

Calls 2

newOidFromCFunction · 0.85
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…