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

Function newOidFromC

git.go:199–207  ·  view source on GitHub ↗
(coid *C.git_oid)

Source from the content-addressed store, hash-verified

197type Oid [20]byte
198
199func newOidFromC(coid *C.git_oid) *Oid {
200 if coid == nil {
201 return nil
202 }
203
204 oid := new(Oid)
205 copy(oid[0:20], C.GoBytes(unsafe.Pointer(coid), 20))
206 return oid
207}
208
209func NewOidFromBytes(b []byte) *Oid {
210 oid := new(Oid)

Callers 15

newRebaseOperationFromCFunction · 0.85
newIndexEntryFromCFunction · 0.85
newTreeEntryFunction · 0.85
diffFileFromCFunction · 0.85
stashForeachCallbackFunction · 0.85
DefaultBlameOptionsFunction · 0.85
blameHunkFromCFunction · 0.85
TargetMethod · 0.85
IdMethod · 0.85
MergeBaseMethod · 0.85
MergeBasesMethod · 0.85
MergeBaseManyMethod · 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…