Example #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
}
Example #2
0
File: git.go Project: fsouza/gogit
func (t *Tree) Id() string {
	oid := C.git_tree_id(t.tree)
	defer C.free(unsafe.Pointer(oid))
	return oidToString(oid)
}