summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-03-22 20:22:39 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2013-03-22 20:27:59 +0100
commit33a59401c377c329e8875cfad2a1332eb514b62a (patch)
tree53f81c0880145275391bbf31eeb3b913e456a334 /include
parent7dbf4039ae0881407fc9ead24c09c1d7cfd4103a (diff)
downloadlibgit2-33a59401c377c329e8875cfad2a1332eb514b62a.tar.gz
graph: make the ahead-behind docs clearer
Explain it in local-upstream branch terms so it's easier to grasp than with the `one` and `two` naming from the merge-base code.
Diffstat (limited to 'include')
-rw-r--r--include/git2/graph.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/git2/graph.h b/include/git2/graph.h
index 5850aa6e2..a2710219e 100644
--- a/include/git2/graph.h
+++ b/include/git2/graph.h
@@ -23,13 +23,18 @@ GIT_BEGIN_DECL
/**
* Count the number of unique commits between two commit objects
*
- * @param ahead number of commits, starting at `one`, unique from commits in `two`
- * @param behind number of commits, starting at `two`, unique from commits in `one`
+ * There is no need for branches containing the commits to have any
+ * upstream relationship, but it helps to think of one as a branch and
+ * the other as its upstream, the `ahead` and `behind` values will be
+ * what git would report for the branches.
+ *
+ * @param ahead number of unique from commits in `upstream`
+ * @param behind number of unique from commits in `local`
* @param repo the repository where the commits exist
- * @param one one of the commits
- * @param two the other commit
+ * @param local the commit for local
+ * @param upstream the commit for upstream
*/
-GIT_EXTERN(int) git_graph_ahead_behind(size_t *ahead, size_t *behind, git_repository *repo, const git_oid *one, const git_oid *two);
+GIT_EXTERN(int) git_graph_ahead_behind(size_t *ahead, size_t *behind, git_repository *repo, const git_oid *local, const git_oid *upstream);
/** @} */
GIT_END_DECL