Skip to content

Commit

Permalink
fix: stop after appending tag commits for previous tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
outofcoffee committed Sep 3, 2023
1 parent 8e6328e commit a45e7f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vcs/commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit a45e7f8

Please sign in to comment.