Exemple #1
0
func (builder *TreeBuilder) Write(repo *Repository) (*Oid, error) {
	oid := new(Oid)
	ecode := C.git_treebuilder_write(oid.git_oid, repo.git_repository, builder.git_treebuilder)
	if ecode != git_SUCCESS {
		return nil, gitError()
	}
	return oid, nil
}
Exemple #2
0
func (v *TreeBuilder) Write() (*Oid, error) {
	oid := new(Oid)
	err := C.git_treebuilder_write(oid.toC(), v.repo.ptr, v.ptr)

	if err < 0 {
		return nil, LastError()
	}

	return oid, nil
}
Exemple #3
0
func (v *TreeBuilder) Write() (*Oid, error) {
	oid := new(Oid)

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	err := C.git_treebuilder_write(oid.toC(), v.ptr)

	if err < 0 {
		return nil, MakeGitError(err)
	}

	return oid, nil
}