|
1 | 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license
|
2 | 2 |
|
| 3 | +""" |
| 4 | + GitAnnotated(repo::GitRepo, commit_id::GitHash) |
| 5 | + GitAnnotated(repo::GitRepo, ref::GitReference) |
| 6 | + GitAnnotated(repo::GitRepo, fh::FetchHead) |
| 7 | + GitAnnotated(repo::GitRepo, comittish::AbstractString) |
| 8 | +
|
| 9 | +An annotated git commit carries with it information about how it was looked up and |
| 10 | +why, so that rebase or merge operations have more information about the context of |
| 11 | +the commit. Conflict files contain information about the source/target branches in |
| 12 | +the merge which are conflicting, for instance. An annotated commit can refer to the |
| 13 | +tip of a remote branch, for instance when a [`FetchHead`](@ref) is passed, or to a |
| 14 | +branch head described using `GitReference`. |
| 15 | +""" |
3 | 16 | function GitAnnotated(repo::GitRepo, commit_id::GitHash)
|
4 | 17 | ann_ptr_ptr = Ref{Ptr{Void}}(C_NULL)
|
5 | 18 | @check ccall((:git_annotated_commit_lookup, :libgit2), Cint,
|
@@ -140,6 +153,12 @@ function merge!(repo::GitRepo, anns::Vector{GitAnnotated}, fastforward::Bool;
|
140 | 153 | return merge_result
|
141 | 154 | end
|
142 | 155 |
|
| 156 | +""" |
| 157 | + merge_base(repo::GitRepo, one::AbstractString, two::AbstractString) -> GitHash |
| 158 | +
|
| 159 | +Find a merge base (a common ancestor) between the commits `one` and `two`. |
| 160 | +`one` and `two` may both be in string form. Return the `GitHash` of the merge base. |
| 161 | +""" |
143 | 162 | function merge_base(repo::GitRepo, one::AbstractString, two::AbstractString)
|
144 | 163 | oid1_ptr = Ref(GitHash(one))
|
145 | 164 | oid2_ptr = Ref(GitHash(two))
|
|
0 commit comments