summaryrefslogtreecommitdiff
path: root/src/git/commit.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-12-02 04:42:33 +0200
committerVicent Marti <tanoku@gmail.com>2010-12-02 04:42:33 +0200
commit41109a7e7eb4544dc64c563d947f6655d45c1a28 (patch)
treed1f577bb368c0d3d61846eda4f5ccdb0aeba8874 /src/git/commit.h
parentc4034e63f358cfed6bd851a831c50dbcd5006ffe (diff)
parenteb095435f338b97f305148e122d6e12fd81621ca (diff)
downloadlibgit2-41109a7e7eb4544dc64c563d947f6655d45c1a28.tar.gz
Merge branch 'commitparents' of https://github.com/JustinLove/libgit2 into JustinLove-commitparents
Diffstat (limited to 'src/git/commit.h')
-rw-r--r--src/git/commit.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/git/commit.h b/src/git/commit.h
index 8cb3401b6..70b08e94f 100644
--- a/src/git/commit.h
+++ b/src/git/commit.h
@@ -94,6 +94,22 @@ GIT_EXTERN(const git_person *) git_commit_author(git_commit *commit);
GIT_EXTERN(const git_tree *) git_commit_tree(git_commit *commit);
/**
+ * Get the number of parents of this commit
+ *
+ * @param commit a previously loaded commit.
+ * @return integer of count of parents
+ */
+GIT_EXTERN(unsigned int) git_commit_parentcount(git_commit *commit);
+
+/**
+ * Get the specified parent of the commit.
+ * @param commit a previously loaded commit.
+ * @param n the position of the entry
+ * @return a pointer to the commit; NULL if out of bounds
+ */
+GIT_EXTERN(git_commit *) git_commit_parent(git_commit *commit, unsigned int n);
+
+/**
* Add a new parent commit to an existing commit
* @param commit the commit object
* @param new_parent the new commit which will be a parent