MCPcopy Create free account
hub / github.com/libgit2/git2go / Delete

Method Delete

branch.go:120–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func (b *Branch) Delete() error {
121
122 runtime.LockOSThread()
123 defer runtime.UnlockOSThread()
124 ret := C.git_branch_delete(b.Reference.ptr)
125 runtime.KeepAlive(b.Reference)
126 if ret < 0 {
127 return MakeGitError(ret)
128 }
129 return nil
130}
131
132func (b *Branch) Move(newBranchName string, force bool) (*Branch, error) {
133 var ptr *C.git_reference

Callers 1

TestRemotePruneFunction · 0.45

Calls 1

MakeGitErrorFunction · 0.85

Tested by 1

TestRemotePruneFunction · 0.36