summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2018-12-14 14:41:17 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2018-12-14 14:44:27 +0100
commit5bd78c48e10a8a025b17a53ed700a42d1b594c08 (patch)
treed5e34f75ed87a1455f66c232830b4c3f85a4cbc1 /include/git2/refs.h
parent0f299365ef4f574e77bdabd2952e2452331cb675 (diff)
downloadlibgit2-5bd78c48e10a8a025b17a53ed700a42d1b594c08.tar.gz
refs: constify git_reference_peel
We have no need to take a non-const reference. This does involve some other work to make sure we don't mix const and non-const variables, but by splitting what we want each variable to do we can also simplify the logic for when we do want to free a new reference we might have allocated.
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r--include/git2/refs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index ec67a8f95..5504c30c9 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -710,7 +710,7 @@ GIT_EXTERN(int) git_reference_normalize_name(
*/
GIT_EXTERN(int) git_reference_peel(
git_object **out,
- git_reference *ref,
+ const git_reference *ref,
git_object_t type);
/**