func (tree *Tree) Id() *Oid { oid := new(Oid) oid.git_oid = C.git_tree_id(tree.git_tree) if oid.git_oid == nil { return nil } return oid }
func (t *Tree) Id() string { oid := C.git_tree_id(t.tree) defer C.free(unsafe.Pointer(oid)) return oidToString(oid) }