diff options
author | Vicent Martà <vicent@github.com> | 2013-05-16 11:10:42 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-05-16 11:10:42 -0700 |
commit | c2d282cfd88ffba7693113786bd2209a5d38b964 (patch) | |
tree | 86da1c83c4ebb442f860147487c488659301d8bb /src/commit.c | |
parent | 18e37db9359bc5e109702eec7422b95fac21b106 (diff) | |
parent | 8d78400142bc001e18e0b0687290d6b446e05130 (diff) | |
download | libgit2-c2d282cfd88ffba7693113786bd2209a5d38b964.tar.gz |
Merge pull request #1590 from arrbee/examples-like-git
Add cat-file to examples (with some public API improvements)
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commit.c b/src/commit.c index be6e32c76..1ab9b34f7 100644 --- a/src/commit.c +++ b/src/commit.c @@ -266,14 +266,16 @@ int git_commit_tree(git_tree **tree_out, const git_commit *commit) return git_tree_lookup(tree_out, commit->object.repo, &commit->tree_id); } -const git_oid *git_commit_parent_id(git_commit *commit, unsigned int n) +const git_oid *git_commit_parent_id( + const git_commit *commit, unsigned int n) { assert(commit); return git_vector_get(&commit->parent_ids, n); } -int git_commit_parent(git_commit **parent, git_commit *commit, unsigned int n) +int git_commit_parent( + git_commit **parent, const git_commit *commit, unsigned int n) { const git_oid *parent_id; assert(commit); |