From 3af06254d0b54feb25799dc1a5ff4853065a633b Mon Sep 17 00:00:00 2001 From: Sascha Cunz Date: Thu, 20 Sep 2012 22:42:22 +0200 Subject: [PATCH] Tags: teach git_tag_list not to include the 'refs/tags/' prefix Since quite a while now, git_branch_foreach has learnt to list branches without the 'refs/heads/' or 'refs/remotes' prefixes. This patch teaches git_tag_list to do the same for listing tags. --- src/tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tag.c b/src/tag.c index 6495d470f..ae9d0a895 100644 --- a/src/tag.c +++ b/src/tag.c @@ -408,7 +408,7 @@ static int tag_list_cb(const char *tag_name, void *payload) filter = (tag_filter_data *)payload; if (!*filter->pattern || p_fnmatch(filter->pattern, tag_name + GIT_REFS_TAGS_DIR_LEN, 0) == 0) - return git_vector_insert(filter->taglist, git__strdup(tag_name)); + return git_vector_insert(filter->taglist, git__strdup(tag_name + GIT_REFS_TAGS_DIR_LEN)); return 0; }