diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-04-12 15:52:34 -0700 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-04-12 15:55:51 -0700 |
commit | def3fef19733b8258f21799e1ff4603e75ced467 (patch) | |
tree | cb145038b5830c33a6b7ebcf4c676ce6f1df438a /include | |
parent | fdd0cc9e8948bb65c9a461c58e5094a3613bd975 (diff) | |
download | libgit2-def3fef19733b8258f21799e1ff4603e75ced467.tar.gz |
Add `git_tag_list`
Lists all the tag references in a repository using a custom callback.
Includes unit tests courtesy of Emeric Fermas <3
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/tag.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/tag.h b/include/git2/tag.h index c751a13c0..3fc6b4499 100644 --- a/include/git2/tag.h +++ b/include/git2/tag.h @@ -275,6 +275,23 @@ GIT_EXTERN(int) git_tag_delete( git_repository *repo, const char *tag_name); +/** + * Fill a list with all the tags in the Repository + * + * The string array will be filled with the names of the + * matching tags; these values are owned by the user and + * should be free'd manually when no longer needed, using + * `git_strarray_free`. + * + * @param array Pointer to a git_strarray structure where + * the tag names will be stored + * @param repo Repository where to find the tags + * @return 0 on success; error code otherwise + */ +GIT_EXTERN(int) git_tag_list( + git_strarray *tag_names, + git_repository *repo); + /** @} */ GIT_END_DECL #endif |