diff --git a/git/git.go b/git/git.go index fb2cc51..306e829 100644 --- a/git/git.go +++ b/git/git.go @@ -110,6 +110,10 @@ func (g *GitRepo) Tags() ([]*object.Tag, error) { tags := []*object.Tag{} _ = ti.ForEach(func(t *object.Tag) error { + refName := plumbing.NewTagReferenceName(t.Name) + if _, unreachable := g.r.Reference(refName, true); unreachable != nil { + return nil + } for i, existing := range tags { if existing.Name == t.Name { if t.Tagger.When.After(existing.Tagger.When) {