示例#1
0
文件: tree.go 项目: jgrocho/go-git2
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
}
示例#2
0
文件: git.go 项目: fsouza/gogit
func (t *Tree) Id() string {
	oid := C.git_tree_id(t.tree)
	defer C.free(unsafe.Pointer(oid))
	return oidToString(oid)
}