diff --git a/vcs/commits.go b/vcs/commits.go index c8eacde..648850b 100644 --- a/vcs/commits.go +++ b/vcs/commits.go @@ -156,9 +156,6 @@ func fetchCommitsBetween( if skip { return nil } - if c.Hash == afterTagCommit.Hash { - return storer.ErrStop - } tagCommit := allTags[c.Hash.String()] if tagCommit != nil { @@ -173,6 +170,11 @@ func fetchCommitsBetween( currentTag = *tagCommit } + // stop after appending tag commits for previous tag + if c.Hash == afterTagCommit.Hash { + return storer.ErrStop + } + longMessage := c.Message if !shouldInclude(longMessage, excludes) { return nil