orhun / git-cliff

A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️
https://git-cliff.org
Apache License 2.0
8.42k stars 174 forks source link

--unreleased does not behave as expected with tags on side branches #750

Open chrissi-p opened 2 weeks ago

chrissi-p commented 2 weeks ago

Is there an existing issue for this?

Description of the bug

If I have a project where tags are also created on side branches and not only on the master branch, git cliff seems to get confused, if the --unreleased flag is used. I would expect to see only commit messages parsed that do not belong to a commit, but this does not seem to be the case. If on a side branch a new tag was created to fix a older version also already tagged commits form the master branch start to appear in the change log. It seams the last commit in time on any branch is used to determine the unreleased commits.

Steps To Reproduce

  1. Create tag 2.0.0 on branch master
  2. Create tag 1.0.1 on branch e.g. release/1
  3. Create tag 2.1.0 on head of master
  4. Add new commit on master
  5. Create a change log on master with git cliff -u

Expected behavior

It is expected that only the newly created commit on master appears in the change log, created by git cliff.

But what I see instead, that also the commits of the tag 2.0.0 are included.

Screenshots / Logs

image001

Software information

Additional context

As soon as a new tag is created on the master branch, the behavior is again as expected.

welcome[bot] commented 2 weeks ago

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️