summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-04-06 14:34:26 +0200
committernulltoken <emeric.fermas@gmail.com>2012-04-10 21:38:49 +0200
commit3f46f313cbfcf57e5cbf3d7dc55b747568a21bef (patch)
tree2fd2f35c2d48bf6adb27279c64fb086af73f8961 /include/git2
parent09719c500ca798fea989867f50cf29d4dbed0c89 (diff)
downloadlibgit2-3f46f313cbfcf57e5cbf3d7dc55b747568a21bef.tar.gz
tag: Add git_tag_peel() which recursively peel a tag until a non tag git_object is met
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/tag.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/tag.h b/include/git2/tag.h
index f7fce3a70..9ab4b7b9e 100644
--- a/include/git2/tag.h
+++ b/include/git2/tag.h
@@ -274,6 +274,21 @@ GIT_EXTERN(int) git_tag_list_match(
const char *pattern,
git_repository *repo);
+/**
+ * Recursively peel a tag until a non tag git_object
+ * is met
+ *
+ * The retrieved `tag_target` object is owned by the repository
+ * and should be closed with the `git_object_free` method.
+ *
+ * @param tag_target Pointer to the peeled git_object
+ * @param tag The tag to be processed
+ * @return GIT_SUCCESS or an error code
+ */
+GIT_EXTERN(int) git_tag_peel(
+ git_object **tag_target,
+ git_tag *tag);
+
/** @} */
GIT_END_DECL
#endif