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

Function stashApplyProgressCallback

stash.go:123–139  ·  view source on GitHub ↗

export stashApplyProgressCallback

(progress C.git_stash_apply_progress_t, handle unsafe.Pointer)

Source from the content-addressed store, hash-verified

121
122//export stashApplyProgressCallback
123func stashApplyProgressCallback(progress C.git_stash_apply_progress_t, handle unsafe.Pointer) C.int {
124 payload := pointerHandles.Get(handle)
125 data, ok := payload.(*stashApplyProgressCallbackData)
126 if !ok {
127 panic("could not retrieve data for handle")
128 }
129 if data == nil || data.callback == nil {
130 return C.int(ErrorCodeOK)
131 }
132
133 err := data.callback(StashApplyProgress(progress))
134 if err != nil {
135 *data.errorTarget = err
136 return C.int(ErrorCodeUser)
137 }
138 return C.int(ErrorCodeOK)
139}
140
141// StashApplyOptions represents options to control the apply operation.
142type StashApplyOptions struct {

Callers

nothing calls this directly

Calls 2

StashApplyProgressTypeAlias · 0.85
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…