diff options
| author | Carlos Martín Nieto <[email protected]> | 2015-09-18 10:52:37 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2015-09-18 10:52:37 +0200 |
| commit | 0522886781055d59b780e00fddf3c8f7c9e118dc (patch) | |
| tree | 797b7644292addcd518dbfea092aa9f3fd1e1e6c /branch.go | |
| parent | b3e7705c48f038ef335204a2a9e1ee829784c30e (diff) | |
| parent | ebf7f15bf9c585102b1c39f6bec5f61a37d18802 (diff) | |
Merge remote-tracking branch 'origin/master' into next
Diffstat (limited to 'branch.go')
| -rw-r--r-- | branch.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -94,6 +94,7 @@ func (repo *Repository) CreateBranch(branchName string, target *Commit, force bo var ptr *C.git_reference cBranchName := C.CString(branchName) + defer C.free(unsafe.Pointer(cBranchName)) cForce := cbool(force) runtime.LockOSThread() @@ -120,6 +121,7 @@ func (b *Branch) Delete() error { func (b *Branch) Move(newBranchName string, force bool) (*Branch, error) { var ptr *C.git_reference cNewBranchName := C.CString(newBranchName) + defer C.free(unsafe.Pointer(cNewBranchName)) cForce := cbool(force) runtime.LockOSThread() @@ -152,6 +154,7 @@ func (repo *Repository) LookupBranch(branchName string, bt BranchType) (*Branch, var ptr *C.git_reference cName := C.CString(branchName) + defer C.free(unsafe.Pointer(cName)) runtime.LockOSThread() defer runtime.UnlockOSThread() @@ -180,6 +183,7 @@ func (b *Branch) Name() (string, error) { func (repo *Repository) RemoteName(canonicalBranchName string) (string, error) { cName := C.CString(canonicalBranchName) + defer C.free(unsafe.Pointer(cName)) nameBuf := C.git_buf{} @@ -197,6 +201,7 @@ func (repo *Repository) RemoteName(canonicalBranchName string) (string, error) { func (b *Branch) SetUpstream(upstreamName string) error { cName := C.CString(upstreamName) + defer C.free(unsafe.Pointer(cName)) runtime.LockOSThread() defer runtime.UnlockOSThread() @@ -223,6 +228,7 @@ func (b *Branch) Upstream() (*Reference, error) { func (repo *Repository) UpstreamName(canonicalBranchName string) (string, error) { cName := C.CString(canonicalBranchName) + defer C.free(unsafe.Pointer(cName)) nameBuf := C.git_buf{} |
