()
| 231 | } |
| 232 | |
| 233 | func (b *Branch) Upstream() (*Reference, error) { |
| 234 | |
| 235 | var ptr *C.git_reference |
| 236 | runtime.LockOSThread() |
| 237 | defer runtime.UnlockOSThread() |
| 238 | |
| 239 | ret := C.git_branch_upstream(&ptr, b.Reference.ptr) |
| 240 | runtime.KeepAlive(b.Reference) |
| 241 | if ret < 0 { |
| 242 | return nil, MakeGitError(ret) |
| 243 | } |
| 244 | return newReferenceFromC(ptr, b.repo), nil |
| 245 | } |
| 246 | |
| 247 | func (repo *Repository) UpstreamName(canonicalBranchName string) (string, error) { |
| 248 | cName := C.CString(canonicalBranchName) |
nothing calls this directly
no test coverage detected