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

Function allocBlob

object.go:154–165  ·  view source on GitHub ↗
(ptr *C.git_blob, repo *Repository)

Source from the content-addressed store, hash-verified

152}
153
154func allocBlob(ptr *C.git_blob, repo *Repository) *Blob {
155 blob := &Blob{
156 Object: Object{
157 ptr: (*C.git_object)(ptr),
158 repo: repo,
159 },
160 cast_ptr: ptr,
161 }
162 runtime.SetFinalizer(blob, (*Blob).Free)
163
164 return blob
165}
166
167func (o *Object) AsBlob() (*Blob, error) {
168 cobj, err := dupObject(o, ObjectBlob)

Callers 1

AsBlobMethod · 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…