Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this do / why do we need it?
Currently git-chglog tool sorts tags by
taggerdate
orauthordate
, which may is not reliable.For example, in our workflow, we may do the following:
Say, at day 1, our repo has the following commits:
we tested commit-3, and tag it as
stg-1
. And commits keep growing:At day 2, we tested commit-5, and we tag commit-5 as
stg-2
:At day 3, we release commit-3, so we tag commit-3 as
prd-3
:At day 4, we want to see changes between last prod release (prd-1) and last stage release (stg-2), the expected result should be commit-4 and comit-5.
But current git-chglog cannot generate the correct change logs, because prd-1 is created later than stg-2.
How this PR fixes the problem?
This PR changes the way of tag sorting by date.
git log --oneline --decorate=short
can generate commit history with tags on each commit, like:We can sort tags with this order.
What should your reviewer look out for in this PR?
Date
field inTag
andRelateTag
? I don't know if change log may refer to tag's date. If yes, we should keep it; otherwise tag date is useless then.Check lists
Additional Comments (if any)
{Please write here}
Which issue(s) does this PR fix?