Skip to content

Commit 56ac6c0

Browse files
committed
graph: document that a commit isn't a descendant of itself
1 parent c7c5f2c commit 56ac6c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/git2/graph.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ GIT_EXTERN(int) git_graph_ahead_behind(size_t *ahead, size_t *behind, git_reposi
4040
/**
4141
* Determine if a commit is the descendant of another commit.
4242
*
43+
* Note that a commit is not considered a descendant of itself, in contrast
44+
* to `git merge-base --is-ancestor`.
45+
*
4346
* @param commit a previously loaded commit.
4447
* @param ancestor a potential ancestor commit.
4548
* @return 1 if the given commit is a descendant of the potential ancestor,

0 commit comments

Comments
 (0)