Beispiel #1
0
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
}
Beispiel #2
0
func (t *Tree) Id() string {
	oid := C.git_tree_id(t.tree)
	defer C.free(unsafe.Pointer(oid))
	return oidToString(oid)
}