summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-07-07 13:47:45 +0200
committerVicent Marti <tanoku@gmail.com>2011-07-07 15:37:07 +0200
commit2b5af615e1f4344f6073d0ddf3e83256d9a8d58f (patch)
tree9c39ac80e17cb8e0c88d3663237c9f9353426ba6 /include/git2
parent417a581d9284021b1ce2edd4da7584b3e2379402 (diff)
downloadlibgit2-2b5af615e1f4344f6073d0ddf3e83256d9a8d58f.tar.gz
tag: add pattern based retrieval of list of tag names
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/tag.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/git2/tag.h b/include/git2/tag.h
index 15635cce2..71b27bb3e 100644
--- a/include/git2/tag.h
+++ b/include/git2/tag.h
@@ -235,6 +235,29 @@ GIT_EXTERN(int) git_tag_list(
git_strarray *tag_names,
git_repository *repo);
+/**
+ * Fill a list with all the tags in the Repository
+ * which name match a defined pattern
+ *
+ * If an empty pattern is provided, all the tags
+ * will be returned.
+ *
+ * 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 tag_names Pointer to a git_strarray structure where
+ * the tag names will be stored
+ * @param pattern Standard fnmatch pattern
+ * @param repo Repository where to find the tags
+ * @return 0 on success; error code otherwise
+ */
+GIT_EXTERN(int) git_tag_list_match(
+ git_strarray *tag_names,
+ const char *pattern,
+ git_repository *repo);
+
/** @} */
GIT_END_DECL
#endif