summaryrefslogtreecommitdiff
path: root/include/git2/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/graph.h')
-rw-r--r--include/git2/graph.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/graph.h b/include/git2/graph.h
index a2710219..c997d8ca 100644
--- a/include/git2/graph.h
+++ b/include/git2/graph.h
@@ -36,6 +36,20 @@ GIT_BEGIN_DECL
*/
GIT_EXTERN(int) git_graph_ahead_behind(size_t *ahead, size_t *behind, git_repository *repo, const git_oid *local, const git_oid *upstream);
+
+/**
+ * Determine if a commit is the descendant of another commit.
+ *
+ * @param commit a previously loaded commit.
+ * @param ancestor a potential ancestor commit.
+ * @return 1 if the given commit is a descendant of the potential ancestor,
+ * 0 if not, error code otherwise.
+ */
+GIT_EXTERN(int) git_graph_descendant_of(
+ git_repository *repo,
+ const git_oid *commit,
+ const git_oid *ancestor);
+
/** @} */
GIT_END_DECL
#endif