summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/git2.h1
-rw-r--r--include/git2/graph.h36
-rw-r--r--include/git2/merge.h11
3 files changed, 37 insertions, 11 deletions
diff --git a/include/git2.h b/include/git2.h
index 501128c43..36f2416c0 100644
--- a/include/git2.h
+++ b/include/git2.h
@@ -23,6 +23,7 @@
#include "git2/repository.h"
#include "git2/revwalk.h"
#include "git2/merge.h"
+#include "git2/graph.h"
#include "git2/refs.h"
#include "git2/reflog.h"
#include "git2/revparse.h"
diff --git a/include/git2/graph.h b/include/git2/graph.h
new file mode 100644
index 000000000..c89efa6dd
--- /dev/null
+++ b/include/git2/graph.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2009-2012 the libgit2 contributors
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+#ifndef INCLUDE_git_graph_h__
+#define INCLUDE_git_graph_h__
+
+#include "common.h"
+#include "types.h"
+#include "oid.h"
+
+/**
+ * @file git2/graph.h
+ * @brief Git graph traversal routines
+ * @defgroup git_revwalk Git graph traversal routines
+ * @ingroup Git
+ * @{
+ */
+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`
+ * @param repo the repository where the commits exist
+ * @param one one of the commits
+ * @param two the other commit
+ */
+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_END_DECL
+#endif
diff --git a/include/git2/merge.h b/include/git2/merge.h
index 928c4758c..59493969c 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -50,17 +50,6 @@ GIT_EXTERN(int) git_merge_base_many(
const git_oid input_array[],
size_t length);
-/**
- * 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`
- * @param repo the repository where the commits exist
- * @param one one of the commits
- * @param two the other commit
- */
-GIT_EXTERN(int) git_count_ahead_behind(int *ahead, int *behind, git_repository *repo, git_oid *one, git_oid *two);
-
/** @} */
GIT_END_DECL
#endif