diff options
| author | Carlos Martín Nieto <[email protected]> | 2015-06-28 01:32:13 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2015-06-28 01:32:13 +0200 |
| commit | e50203a2531209d32fab9d9b5fea3ff55c873c86 (patch) | |
| tree | 782cd6f6816aec27707f2b84df4471e9a6983440 /branch.go | |
| parent | 70c95a7655eddffda4cd8fddd87536c5580136fe (diff) | |
| parent | 2488de286c0f73b31e95820835767adc3d2ee101 (diff) | |
Merge remote-tracking branch 'upstream/master' into next
Conflicts:
branch.go
Diffstat (limited to 'branch.go')
| -rw-r--r-- | branch.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -92,18 +92,18 @@ func (repo *Repository) NewBranchIterator(flags BranchType) (*BranchIterator, er func (repo *Repository) CreateBranch(branchName string, target *Commit, force bool) (*Branch, error) { - ref := new(Reference) + var ptr *C.git_reference cBranchName := C.CString(branchName) cForce := cbool(force) runtime.LockOSThread() defer runtime.UnlockOSThread() - ret := C.git_branch_create(&ref.ptr, repo.ptr, cBranchName, target.cast_ptr, cForce) + ret := C.git_branch_create(&ptr, repo.ptr, cBranchName, target.cast_ptr, cForce) if ret < 0 { return nil, MakeGitError(ret) } - return ref.Branch(), nil + return newReferenceFromC(ptr, repo).Branch(), nil } func (b *Branch) Delete() error { |
