Skip to content

Commit

Permalink
fix: Fix empty changelog when HEAD is a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Mar 12, 2024
1 parent 2991ae0 commit 45e3d65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ func run(cmd *cobra.Command, args []string) error {
return err
}

var latest *plumbing.Reference
var previous *plumbing.Reference
if err := tags.ForEach(func(reference *plumbing.Reference) error {
previous = reference
previous = latest
latest = reference
return nil
}); err != nil && !errors.Is(err, io.EOF) {
return err
Expand Down

0 comments on commit 45e3d65

Please sign in to comment.