export stashApplyProgressCallback
(progress C.git_stash_apply_progress_t, handle unsafe.Pointer)
| 121 | |
| 122 | //export stashApplyProgressCallback |
| 123 | func 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. |
| 142 | type StashApplyOptions struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…