From d2c4023832e26d3fe3f77c9fa8581588ea812cc2 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sat, 15 Jun 2024 18:15:22 +0200 Subject: fix: Add support lightweight tags For now all tags are read as reference. That cause tags to not carry its message body by default but it will be added in the future. For now simple tags will do. --- pkg/git/git.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkg/git/git.go') diff --git a/pkg/git/git.go b/pkg/git/git.go index ad5d3bc..428bfb1 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -107,14 +107,14 @@ func (g *GitRepository) Head() (*plumbing.Reference, error) { return g.repository.Head() } -func (g *GitRepository) Tags() ([]*object.Tag, error) { - ti, err := g.repository.TagObjects() +func (g *GitRepository) Tags() ([]*plumbing.Reference, error) { + ti, err := g.repository.Tags() if err != nil { return nil, err } - tags := []*object.Tag{} - err = ti.ForEach(func(t *object.Tag) error { + tags := []*plumbing.Reference{} + err = ti.ForEach(func(t *plumbing.Reference) error { tags = append(tags, t) return nil }) -- cgit v1.2.3