Comments (3)
Hello!
When I look at the git history, changelog makes sense.
First, v1.0.0
is created and it has only one commit. So this part is correct:
## [1.0.0] - 2021-12-11
### Features
- V1.0.0
Then, you committed chore: start work on v1.1.0
and then realized there is something wrong with v1.0.0
so checked out to a new branch called hotfix/1.0.1
. You created one commit there (fix: v1.0.1
) and merged it with develop
and master
after creating a tag (v1.0.1
).
So v1.0.1
has 2 commits:
## [1.0.1] - 2021-12-11
### Bug Fixes
- V1.0.1
### Miscellaneous Tasks
- Start work on v1.1.0
In this case, chore: start work on v1.1.0
is not really an "unreleased" commit because it belongs to a tag which is 1.0.1
:
$ git tag --contains $(git log --pretty=format:"%h" --all --grep='start work on v1.1.0')
v1.0.1
How can we prevent that the hotfix changes an the unreleased changes are combined by their commit date?
I can't really see a problem about the changelog here :/ That's why I can't answer your question.
I used the following script to reproduce the git history, let me know if I missed something:
git init
git checkout -b develop
git commit --allow-empty -m "feat: v1.0.0"
git tag v1.0.0
git checkout -b master
git commit --allow-empty -m "chore: start work on v1.1.0"
git checkout -b hotfix/1.0.1
git commit --allow-empty -m "fix: v1.0.1"
git tag v1.0.1
git checkout master
git merge hotfix/1.0.1
git checkout develop
git merge --no-ff hotfix/1.0.1
Results in:
$ git log --graph --decorate --oneline --all
* 95dffa5 (HEAD -> develop) Merge branch 'hotfix/1.0.1' into develop
|\
| * 19b11a5 (tag: v1.0.1, master, hotfix/1.0.1) fix: v1.0.1
| * 63b9805 chore: start work on v1.1.0
|/
* a5c4ec6 (tag: v1.0.0) feat: v1.0.0
from git-cliff.
Hello!
I've found the same problem using one-flow in my company. To be more clear this is the actual tree (without the commit message)
* | 27140a9d Merge branch 'hotfix/0.1.2'
|\|
| * 022a4b39 (tag: 0.1.2)
| * 53facfc6
* | a0d128ef Merge branch 'hotfix/0.1.1'
|\|
| * 7f3a1138 (tag: 0.1.1)
| * bcd19c61
| * 3cbd184b
| * 6a595cea
| * 95dad508
| * 13629cdf
| * e63b69fc
| * 2e189876
| * 1b73f166
* | fd2b4867
* | 6ab9686d
* | 76450746
* | 9a76ce27
* | 02e66f25
* | 88513cf2
* | f5f555ff Merge branch 'release/0.1.0'
| * e836919f (release/0.1.0)
The changelogs created internally in the hotfix branches (that are tagged from 0.1.1 and 0.1.2) were built correctly with only 53facfc6 for 0.1.2 and 1b73f166...bcd19c61 for the 0.1.1.
But after the last merge when we try to generate a changelog from the master branch the range of commits between the release merge (f5f555ff) and the tags (this is the rage: 88513cf2...fd2b4867) are inserted under the 0.1.1 version which is not the truth for the project.
That sounds like the problem described by @Pyth0ff
from git-cliff.
#415 addresses this.
from git-cliff.
Related Issues (20)
- merge identical commit messages HOT 2
- Allow the whole commit object to be used as a field inside of a commit parser HOT 2
- Bitbucket integration not working with self-hosted instance HOT 2
- Slow for large repositories with binary files in Git LFS and long history
- Config environment variables are not respected when cliff.toml is not found HOT 5
- Github integration is not run when printing context (`--context`) HOT 8
- Detailed template errors out with template render error HOT 2
- Change to MiniJinja HOT 8
- Regenerating changelog after taging changes the date
- [gitlab] context data are missing HOT 2
- Support a body template specifically for when there are no contributing commits HOT 1
- git-cliff-core: allow adding arbitrary values to commits HOT 6
- Allow disabling topological order for commits
- `--bumped-version` does not return `initial_tag` if there are no conventional commits in the history. HOT 4
- GitLab does not have merge request number for new contributors HOT 2
- `--bumped-version` fails if commit is skipped by `commit_parsers` HOT 5
- PR information is discarded when using `--from-context` HOT 1
- New Contributors section missing after generating changelog HOT 1
- Respect `git replace` HOT 11
- Add output file configuration option HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-cliff.