summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-04-11 17:41:21 +0200
committerCarlos Martín Nieto <cmn@elego.de>2011-04-11 17:43:56 +0200
commit55c197cdd37b34c7b4877bc0434c297075e11222 (patch)
tree05dcc126d117b1753e07f0a173cf9498a38ac4f9 /src/commit.c
parentb075b9910c56c356d53439fd34486a905146211a (diff)
parentfdd0cc9e8948bb65c9a461c58e5094a3613bd975 (diff)
downloadlibgit2-55c197cdd37b34c7b4877bc0434c297075e11222.tar.gz
Merge upstream/development
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/commit.c b/src/commit.c
index 9fc3f0767..9621703c3 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -318,6 +318,7 @@ GIT_COMMIT_GETTER(const char *, message_short, commit->message_short)
GIT_COMMIT_GETTER(git_time_t, time, commit->committer->when.time)
GIT_COMMIT_GETTER(int, time_offset, commit->committer->when.offset)
GIT_COMMIT_GETTER(unsigned int, parentcount, commit->parent_oids.length)
+GIT_COMMIT_GETTER(const git_oid *, tree_oid, &commit->tree_oid);
int git_commit_tree(git_tree **tree_out, git_commit *commit)
@@ -338,4 +339,9 @@ int git_commit_parent(git_commit **parent, git_commit *commit, unsigned int n)
return git_commit_lookup(parent, commit->object.repo, parent_oid);
}
+const git_oid *git_commit_parent_oid(git_commit *commit, unsigned int n)
+{
+ assert(commit);
+ return git_vector_get(&commit->parent_oids, n);
+}