()
| 143 | } |
| 144 | |
| 145 | func (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 | |
| 154 | func allocBlob(ptr *C.git_blob, repo *Repository) *Blob { |
| 155 | blob := &Blob{ |