示例#1
0
文件: object.go 项目: jgrocho/go-git2
func (obj *Object) Owner() *Repository {
	repo := new(Repository)
	repo.git_repository = C.git_object_owner(obj.git_object)
	if repo.git_repository == nil {
		return nil
	}
	return repo
}
示例#2
0
文件: object.go 项目: wid/git2go
// Owner returns a weak reference to the repository which owns this
// object
func (o gitObject) Owner() *Repository {
	return &Repository{
		ptr: C.git_object_owner(o.ptr),
	}
}
示例#3
0
文件: object.go 项目: tmc/goit
func (o Object) Repository() *Repository {
	r := new(Repository)
	r.repo = C.git_object_owner(o.obj)
	return r
}