Merge pull request #30 from vvakame/fix-panic

fix: Panic occured when exec --next-tag with HEAD with tag
This commit is contained in:
tsuyoshi wada 2018-11-10 10:20:29 +09:00 committed by GitHub
commit b9e0bcd492
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,7 +195,7 @@ func (gen *Generator) readVersions(tags []*Tag, first string) ([]*Version, error
})
// Instead of `getTags()`, assign the date to the tag
if isNext {
if isNext && len(commits) != 0 {
tag.Date = commits[0].Author.Date
}
}