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

Function indexMatchedPathCallback

index.go:339–352  ·  view source on GitHub ↗

export indexMatchedPathCallback

(cPath, cMatchedPathspec *C.char, payload unsafe.Pointer)

Source from the content-addressed store, hash-verified

337
338//export indexMatchedPathCallback
339func indexMatchedPathCallback(cPath, cMatchedPathspec *C.char, payload unsafe.Pointer) C.int {
340 data, ok := pointerHandles.Get(payload).(*indexMatchedPathCallbackData)
341 if !ok {
342 panic("invalid matched path callback")
343 }
344
345 err := data.callback(C.GoString(cPath), C.GoString(cMatchedPathspec))
346 if err != nil {
347 *data.errorTarget = err
348 return C.int(ErrorCodeUser)
349 }
350
351 return C.int(ErrorCodeOK)
352}
353
354func (v *Index) RemoveByPath(path string) error {
355 cstr := C.CString(path)

Callers

nothing calls this directly

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…