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

Function toPointer

patch.go:60–67  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

58}
59
60func toPointer(data []byte) (ptr unsafe.Pointer) {
61 if len(data) > 0 {
62 ptr = unsafe.Pointer(&data[0])
63 } else {
64 ptr = unsafe.Pointer(nil)
65 }
66 return
67}
68
69func (v *Repository) PatchFromBuffers(oldPath, newPath string, oldBuf, newBuf []byte, opts *DiffOptions) (*Patch, error) {
70 var patchPtr *C.git_patch

Callers 1

PatchFromBuffersMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…