summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-17 17:33:51 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-17 17:33:51 +0200
commit3be933b143731bbe3a5cadcdf70b8ab205a629c0 (patch)
tree9688ce16cb1fa2ee16499d20e5d501a2f3d98d90 /include/git2/refs.h
parentf124ebd457bfbf43de3516629aaba5a279636e04 (diff)
downloadlibgit2-3be933b143731bbe3a5cadcdf70b8ab205a629c0.tar.gz
refs: Add `git_referene_target_peel`
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r--include/git2/refs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index e0451ba82..1ff0d4544 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -133,6 +133,17 @@ GIT_EXTERN(int) git_reference_create(git_reference **out, git_repository *repo,
GIT_EXTERN(const git_oid *) git_reference_target(const git_reference *ref);
/**
+ * Return the peeled OID target of this reference.
+ *
+ * This peeled OID only applies to direct references that point to
+ * a hard Tag object: it is the result of peeling such Tag.
+ *
+ * @param ref The reference
+ * @return a pointer to the oid if available, NULL otherwise
+ */
+GIT_EXTERN(const git_oid *) git_reference_target_peel(const git_reference *ref);
+
+/**
* Get full name to the reference pointed to by a symbolic reference.
*
* Only available if the reference is symbolic.