Beispiel #1
0
func (builder *TreeBuilder) Remove(filename string) error {
	cfilename := C.CString(filename)
	defer C.free(unsafe.Pointer(cfilename))
	ecode := C.git_treebuilder_remove(builder.git_treebuilder, cfilename)
	if ecode != git_SUCCESS {
		return gitError()
	}
	return nil
}
Beispiel #2
0
func (v *TreeBuilder) Remove(filename string) error {
	cfilename := C.CString(filename)
	defer C.free(unsafe.Pointer(cfilename))

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	err := C.git_treebuilder_remove(v.ptr, cfilename)
	if err < 0 {
		return MakeGitError(err)
	}

	return nil
}