libgit2

git_tag_list_match

Version:

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.

Signature

int git_tag_list_match(git_strarray *tag_names, const char *pattern, git_repository *repo);

Parameters

In
tag_names

Pointer to a git_strarray structure where the tag names will be stored

const char *
In
pattern

Standard fnmatch pattern

In
repo

Repository where to find the tags

Returns

int

GIT_SUCCESS or an error code

Versions