summaryrefslogtreecommitdiff
path: root/include/git2/commit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/commit.h')
-rw-r--r--include/git2/commit.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h
index a420ba635..20b345f84 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -164,7 +164,10 @@ GIT_EXTERN(unsigned int) git_commit_parentcount(const git_commit *commit);
* @param n the position of the parent (from 0 to `parentcount`)
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_commit_parent(git_commit **out, git_commit *commit, unsigned int n);
+GIT_EXTERN(int) git_commit_parent(
+ git_commit **out,
+ const git_commit *commit,
+ unsigned int n);
/**
* Get the oid of a specified parent for a commit. This is different from
@@ -175,7 +178,9 @@ GIT_EXTERN(int) git_commit_parent(git_commit **out, git_commit *commit, unsigned
* @param n the position of the parent (from 0 to `parentcount`)
* @return the id of the parent, NULL on error.
*/
-GIT_EXTERN(const git_oid *) git_commit_parent_id(git_commit *commit, unsigned int n);
+GIT_EXTERN(const git_oid *) git_commit_parent_id(
+ const git_commit *commit,
+ unsigned int n);
/**
* Get the commit object that is the <n>th generation ancestor