()
| 121 | } |
| 122 | |
| 123 | func (o *Object) AsTree() (*Tree, error) { |
| 124 | cobj, err := dupObject(o, ObjectTree) |
| 125 | if err != nil { |
| 126 | return nil, err |
| 127 | } |
| 128 | |
| 129 | return allocTree((*C.git_tree)(cobj), o.repo), nil |
| 130 | } |
| 131 | |
| 132 | func allocCommit(ptr *C.git_commit, repo *Repository) *Commit { |
| 133 | commit := &Commit{ |