Skip to content

Commit 2793bdc

Browse files
committed
fix: ignore tags that can't find the commit date for
- in repos where tags are a long way back it's possible that commit date can't be found anymore
1 parent 1b94301 commit 2793bdc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/get_tags.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ func (g *Git) getTags() ([]*Tag, error) {
2323
commitDate, err := g.commitDate(t.Hash())
2424

2525
if err != nil {
26-
return err
26+
if g.Debug {
27+
log.Printf("tag: %v ignored due to missing commit date: %v", t.Name(), err)
28+
}
29+
return nil
2730
}
2831

2932
tags = append(tags, &Tag{Name: t.Name().String(), Date: commitDate, Hash: t.Hash()})

0 commit comments

Comments
 (0)