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

Method AsCommit

object.go:145–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143}
144
145func (o *Object) AsCommit() (*Commit, error) {
146 cobj, err := dupObject(o, ObjectCommit)
147 if err != nil {
148 return nil, err
149 }
150
151 return allocCommit((*C.git_commit)(cobj), o.repo), nil
152}
153
154func allocBlob(ptr *C.git_blob, repo *Repository) *Blob {
155 blob := &Blob{

Callers 4

TestObjectPoymorphismFunction · 0.95
LookupCommitMethod · 0.80
LookupPrefixCommitMethod · 0.80
appendCommitFunction · 0.80

Calls 2

dupObjectFunction · 0.85
allocCommitFunction · 0.85

Tested by 2

TestObjectPoymorphismFunction · 0.76
appendCommitFunction · 0.64