()
| 147 | } |
| 148 | |
| 149 | func (b *Branch) IsHead() (bool, error) { |
| 150 | |
| 151 | runtime.LockOSThread() |
| 152 | defer runtime.UnlockOSThread() |
| 153 | |
| 154 | ret := C.git_branch_is_head(b.Reference.ptr) |
| 155 | runtime.KeepAlive(b.Reference) |
| 156 | switch ret { |
| 157 | case 1: |
| 158 | return true, nil |
| 159 | case 0: |
| 160 | return false, nil |
| 161 | } |
| 162 | return false, MakeGitError(ret) |
| 163 | |
| 164 | } |
| 165 | |
| 166 | func (repo *Repository) LookupBranch(branchName string, bt BranchType) (*Branch, error) { |
| 167 | var ptr *C.git_reference |
nothing calls this directly
no test coverage detected