Skip to content

Commit e744bd9

Browse files
committed
fix: check previousTag
fixes a bug where if there's only one tag the log creation fails
1 parent e675c75 commit e744bd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitutils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func isCommitToNearestTag(repo *git.Repository, commit *object.Commit) bool {
7575
log.Fatal("Couldn't get latest tag...", err)
7676
}
7777

78-
if latestTag != nil {
78+
if latestTag != nil && previousTag != nil {
7979
if tillLatest {
8080
return latestTag.Hash().String() == commit.Hash.String()
8181
}

0 commit comments

Comments
 (0)