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

Function stashForeachCallback

stash.go:249–262  ·  view source on GitHub ↗

export stashForeachCallback

(index C.size_t, message *C.char, id *C.git_oid, handle unsafe.Pointer)

Source from the content-addressed store, hash-verified

247
248//export stashForeachCallback
249func stashForeachCallback(index C.size_t, message *C.char, id *C.git_oid, handle unsafe.Pointer) C.int {
250 payload := pointerHandles.Get(handle)
251 data, ok := payload.(*stashCallbackData)
252 if !ok {
253 panic("could not retrieve data for handle")
254 }
255
256 err := data.callback(int(index), C.GoString(message), newOidFromC(id))
257 if err != nil {
258 *data.errorTarget = err
259 return C.int(ErrorCodeUser)
260 }
261 return C.int(ErrorCodeOK)
262}
263
264// Foreach loops over all the stashed states and calls the callback
265// for each one.

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…