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

Function newPatchFromC

patch.go:17–28  ·  view source on GitHub ↗
(ptr *C.git_patch)

Source from the content-addressed store, hash-verified

15}
16
17func newPatchFromC(ptr *C.git_patch) *Patch {
18 if ptr == nil {
19 return nil
20 }
21
22 patch := &Patch{
23 ptr: ptr,
24 }
25
26 runtime.SetFinalizer(patch, (*Patch).Free)
27 return patch
28}
29
30func (patch *Patch) Free() error {
31 if patch.ptr == nil {

Callers 2

PatchFromBuffersMethod · 0.85
PatchMethod · 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…