diff options
author | Jakob Pfender <jpfender@elegosoft.com> | 2011-04-11 12:38:50 +0200 |
---|---|---|
committer | Jakob Pfender <jpfender@elegosoft.com> | 2011-04-11 12:38:50 +0200 |
commit | 1eb0f68ec7735bd3df8f9cb49fed232d1bbfae3d (patch) | |
tree | a649cb025892f8f3947ba4cbd0fa98ff3ae9b368 /src/commit.c | |
parent | fd279b262df31c9a5d88db78e9e9a6de07e62979 (diff) | |
parent | fdd0cc9e8948bb65c9a461c58e5094a3613bd975 (diff) | |
download | libgit2-1eb0f68ec7735bd3df8f9cb49fed232d1bbfae3d.tar.gz |
merge branch development
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 6 |
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); +} |