From eb095435f338b97f305148e122d6e12fd81621ca Mon Sep 17 00:00:00 2001 From: Justin Love Date: Tue, 30 Nov 2010 21:28:39 -0600 Subject: add git_commit_parent to retrieve a parent by index --- src/git/commit.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/git/commit.h') diff --git a/src/git/commit.h b/src/git/commit.h index cc4e7a073..70b08e94f 100644 --- a/src/git/commit.h +++ b/src/git/commit.h @@ -101,6 +101,14 @@ GIT_EXTERN(const git_tree *) git_commit_tree(git_commit *commit); */ 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 -- cgit v1.2.1