(commit, ancestor *Oid)
| 9 | ) |
| 10 | |
| 11 | func (repo *Repository) DescendantOf(commit, ancestor *Oid) (bool, error) { |
| 12 | runtime.LockOSThread() |
| 13 | defer runtime.UnlockOSThread() |
| 14 | |
| 15 | ret := C.git_graph_descendant_of(repo.ptr, commit.toC(), ancestor.toC()) |
| 16 | runtime.KeepAlive(repo) |
| 17 | runtime.KeepAlive(commit) |
| 18 | runtime.KeepAlive(ancestor) |
| 19 | if ret < 0 { |
| 20 | return false, MakeGitError(ret) |
| 21 | } |
| 22 | |
| 23 | return (ret > 0), nil |
| 24 | } |
| 25 | |
| 26 | func (repo *Repository) AheadBehind(local, upstream *Oid) (ahead, behind int, err error) { |
| 27 | runtime.LockOSThread() |
nothing calls this directly
no test coverage detected