func (b *Branch) Delete() error { runtime.LockOSThread() defer runtime.UnlockOSThread() ret := C.git_branch_delete(b.Reference.ptr) if ret < 0 { return MakeGitError(ret) } return nil }
func (repo *Repository) DeleteBranch(name string, flag BranchType) error { cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) cflag := C.git_branch_t(flag) ecode := C.git_branch_delete(repo.git_repository, cname, cflag) if ecode != git_SUCCESS { return gitError() } return nil }